rz-ghidra
rz-ghidra copied to clipboard
Honor analysis hints
Currently, the plugin does not honor analysis hints. So for example, if we have this instruction
cmp dl, 0x55;
and we want to treat 0x55 as "U". We would use ahi s
. Then the instruction would look like this cmp dl, 'U';
. This change does not affect the plugin and it will show if (?? == 0x55)
instead of if (?? == 'U')
.
This is possible from Ghidra, and when an immediate base is changed, it reflects the decompiler
In Ghidra this is called "EquateSymbol", can be found on database.cc
for example
Adds something like this to the xml. Here I changed the value of immediate at addr 0x102728 from 0x54 to Char
<mapsym type="equate">
<equatesymbol name="" typelock="true" namelock="false" cat="1" format="char">
<value>0x54</value>
</equatesymbol>
<hash val="0x1e171528718"/><rangelist><range space="ram" first="0x102728" last="0x102728"/></rangelist>
<hash val="0x2e1664a6771"/><rangelist><range space="ram" first="0x102728" last="0x102728"/></rangelist>
<hash val="0x2813ba6367d"/><rangelist><range space="ram" first="0x102728" last="0x102728"/></rangelist>
</mapsym>