2

When decompiling an exe file, I have defined two structs struct A and struct B that are of the same structure. They appeared under different contexts, thus I assumed that they were different structs. However, as the contexts merge, I realize that these are in fact the same struct.

Now I would like to get rid of struct B and replace all its occurance with struct A. Is it possible to do that without manually changing everything?

I know that I can define struct B as containing just one struct A as its member, but this feels less optimal and creates unnecessary syntax in decompiled code.

1 Answer 1

5

You can do that through the "local types" window (View -> Open subviews -> Local types). Right-click on the structure and select Map to another type.

1
  • Thank you , this works fine.
    – WhatsUp
    Sep 26, 2022 at 23:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.