Closed fjh658 closed 5 years ago
Please review PR. @aquynh Thank you.
sorry for very late reply!
this looks good, but please confirm that this works for v6.x
also, would you mind verifying the pull req https://github.com/keystone-engine/keypatch/pull/36, to confirm it works for v7.x?
thanks!
sorry for very late reply!
this looks good, but please confirm that this works for v6.x
It works that I tested for v6.x. @aquynh
also, would you mind verifying the pull req #36, to confirm it works for v7.x?
thanks!
not
recommended for merging, there are some problems.Python>ea = idaapi.get_name_ea(here(), "Memory")
Python>print(hex(ea))
0x140046aa8L
Error:
Python>(type, value) = idaapi.get_name_value(here(), "Memory")
Python>print(hex(value))
0xffffffffffffffe0L
Correct result:
name
is not ea
will be incorrect.About the current situation of this function get_name_value
The following code is not seen to have any problems, no need to modify. https://github.com/keystone-engine/keypatch/pull/36/commits/36cdc9497644f68b887fff41d31bf0002129d06e
# ask IDA to re-analyze the patched area
if orig_func_end == idc.BADADDR:
# only analyze patched bytes, otherwise it would take a lot of time to re-analyze the whole binary
idaapi.analyze_area(address, address + patched_len + 1)
else:
idaapi.analyze_area(address, orig_func_end)
# try to fix IDA function re-analyze issue after patching
idaapi.func_setend(address, orig_func_end)
@aquynh
merged, thanks!
Fixed the form(Patcher, Search, Fill Range) cannot be shown for ida pro 7.2 release version.
The PR has been tested on ida6.x, ida7.0, 7.1, 7.2.
@aquynhPlease see the picture below:![image](https://user-images.githubusercontent.com/5550316/47271003-47c23f00-d5a6-11e8-9bae-a4314178f8f1.png)