diff options
| author | serpilliere <serpilliere@users.noreply.github.com> | 2020-06-10 12:14:34 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-10 12:14:34 +0200 |
| commit | 030d19ae958b40e52dd8dfe4475fc181eae1480e (patch) | |
| tree | c75f089b9860588342492b1068ba0bc3c26dea85 /example/ida/ctype_propagation.py | |
| parent | dd2fd9c8e424463591782472192627cfdbe397f5 (diff) | |
| parent | ce517ae68975e6f39c11e3b62d68548bc85b6f6b (diff) | |
| download | miasm-030d19ae958b40e52dd8dfe4475fc181eae1480e.tar.gz miasm-030d19ae958b40e52dd8dfe4475fc181eae1480e.zip | |
Merge pull request #1185 from nofiv/IDAPython74
Ported IDAPython code to the 7.4 version
Diffstat (limited to 'example/ida/ctype_propagation.py')
| -rw-r--r-- | example/ida/ctype_propagation.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/example/ida/ctype_propagation.py b/example/ida/ctype_propagation.py index f333d69a..35cd53bb 100644 --- a/example/ida/ctype_propagation.py +++ b/example/ida/ctype_propagation.py @@ -27,13 +27,13 @@ class TypePropagationForm(ida_kernwin.Form): default_types_info = r"""ExprId("RDX", 64): char *""" archs = ["AMD64_unk", "X86_32_unk", "msp430_unk"] - func = ida_funcs.get_func(idc.ScreenEA()) - func_addr = func.startEA + func = ida_funcs.get_func(idc.get_screen_ea()) + func_addr = func.start_ea - start_addr = idc.SelStart() + start_addr = idc.read_selection_start() if start_addr == idc.BADADDR: - start_addr = idc.ScreenEA() - end_addr = idc.SelEnd() + start_addr = idc.get_screen_ea() + end_addr = idc.read_selection_end() ida_kernwin.Form.__init__(self, r"""BUTTON YES* Launch @@ -205,7 +205,7 @@ class SymbExecCTypeFix(SymbExecCType): ) self.eval_updt_assignblk(assignblk) for offset, value in viewitems(offset2cmt): - idc.MakeComm(offset, '\n'.join(value)) + idc.set_cmt(offset, '\n'.join(value), 0) print("%x\n" % offset, '\n'.join(value)) return self.eval_expr(self.ir_arch.IRDst) @@ -227,8 +227,8 @@ def get_ira_call_fixer(ira): def call_effects(self, ad, instr): print(hex(instr.offset), instr) - stk_before = idc.GetSpd(instr.offset) - stk_after = idc.GetSpd(instr.offset + instr.l) + stk_before = idc.get_spd(instr.offset) + stk_after = idc.get_spd(instr.offset + instr.l) stk_diff = stk_after - stk_before print(hex(stk_diff)) call_assignblk = AssignBlock( |