New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Edit Function
dialogue chooses incorrect type when confronted with a typedef using the same name (see Microsoft VC headers).
#6430
Comments
I assume these are contained with different Categories. Otherwise, Ghidra would have named one of them with a |
If your situation is simialr to my test, you start with three types:
Note that No.2 type above can be seen in tree if you enable Pointer toggle button (PointerFinger). It is also important to note that the use of the datatype chooser does not facilitate subsequent modification within the table edit box (e.g., adding a * to force a pointer). This will cause it to search again. Since their is only one "_PVFV *" defined it will use that one (No.2 type above). You will need to first establish a pointer to your _PVFV typedef in the datatype tree before you can select it from the datatype chooser. |
Mmm, seems to work now. |
Describe the bug
Given a function definition of
void _PVFV()
and a typedef of
typedef _PVFV _PVFV *
(used often in MS source files) trying to use the typedef'd version in the
Edit Function
dialogue doesn't work, it uses a pointer to the function instead.To Reproduce
Steps to reproduce the behavior:
_initterm
) and edit it to try to define it asvoid _initterm (_PVFV * pfbegin, _PVFV * pfend)
In step 3 you are asked which
_PVFV
type you mean, but Ghidra always reverts to the function definition!Expected behavior
For the editor to use the correct type.
Screenshots
N/A
Attachments
N/A
Environment (please complete the following information):
Additional context
If you rename the typedef and use that, everything works. You can even then rename it back and, providing you don't edit it again, all's well!
The text was updated successfully, but these errors were encountered: