1

Let's say I have this code in the decompiler of IDA pro:

var1 = var2; 

And assume the type of var1 is X (for example X could be char array with size 5). Is there anyway that I can tell IDA that whenever you see such assignments, change the type of var2 to X as well?

Considering that var1 is type X, then obviously var2 should be type X as well, but right now I have to manually change the type every time… The problem is this is happening inside a large function thousands of times and I can't manually change every time, I need to somehow force IDA to do it. But how?

1
  • 1
    If var1 is never re-assigned deeper in the function (meaning that it is just an exact copy of var2), you can try the "=" shortcut to merge the two variables. I know this is not exactely what you've asked, but it may same you some time :) Commented Feb 22, 2022 at 8:39

1 Answer 1

2

HexRaysPyTools has this feature, which it calls "recasting" (SHIFT-L, SHIFT-R). It's generally an excellent piece of software and I recommend it.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.