Skip to content
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

Open
Wall-AF opened this issue Apr 16, 2024 · 0 comments

Comments

@Wall-AF
Copy link

Wall-AF commented Apr 16, 2024

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:

  1. Setup a function and the typedef above
  2. Setup some data as the typedef'd verison (in your data area)
  3. Find a function (such as _initterm) and edit it to try to define it as void _initterm (_PVFV * pfbegin, _PVFV * pfend)
  4. Look at call and see casts (thy should not be there)

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):

  • OS: Windows 11
  • Java Version: 17.0.3.1
  • Ghidra Version: 11.1-DEV
  • Ghidra Origin: locally

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant