It appears to me that in my function the compiler has reused a stack slot for two variables of types. However, Hex-Rays has not recognized it as such. How can I split the local variable into two?
-
I think it depends on the exact situation, can you post an example?– Willem HengeveldCommented May 26, 2018 at 10:30
-
@WillemHengeveld it's a pretty long function, but here: gist.github.com/Zhentar/d65a0bbdcd489719cbec7b0b00761f85 a3a, a4a, time, and time_1 are ones that I've noticed that seem to be aliased– ZhentarCommented May 26, 2018 at 21:28
-
I usually add structs with unions to make the output slightly more readable when the compiler has reused a stack slot for different variables.– Léo LamCommented May 27, 2018 at 8:55
-
@LéoLam you should post that as an answer so I can accept it :)– ZhentarCommented May 28, 2018 at 3:06
Add a comment
|
1 Answer
I usually add structs with unions to make the output slightly more readable when the compiler has reused a stack slot for different variables.
In 7.2, it seems that you can force the decompiler to "create a new variable", which makes this easier and less ugly. Yay!