ghidra
ghidra copied to clipboard
Decompiler: Restarted to delay deadcode elimination for space: register
Subj. I don't know what exactly it means, but it breaks some code decompilation. For example, I have my custom Sleigh language, and this is how it gets decompiled:
This code contains a lot of similar instructions with only some differences in indices and strings (I double checked it in the disasm). But, starting from the line 475
the decompiler decides to use another variable, which is incorrect, because at the line 478
it uses the same variable for different array_item_set
arguments.
Good:
Wrong:
I believe it's not enough space to store some state for registers, that's why it resets.
Solved by specifying in my cspec:
<deadcodedelay space="register" delay="10"/>
I don't know an exact value to use.