diff options
| author | serpilliere <devnull@localhost> | 2014-07-21 11:38:01 +0200 |
|---|---|---|
| committer | serpilliere <devnull@localhost> | 2014-07-21 11:38:01 +0200 |
| commit | 0c2b5ebcf567c4ef7649930d3f72a11677220de6 (patch) | |
| tree | 83e7e4d81266fd78c253624f2aaaf9349fadb987 /miasm2 | |
| parent | 2342e243c9a5ef398c0f4faa05da9439e2e4949a (diff) | |
| download | miasm-0c2b5ebcf567c4ef7649930d3f72a11677220de6.tar.gz miasm-0c2b5ebcf567c4ef7649930d3f72a11677220de6.zip | |
X86; fix disasm cb transformation call/pop
Diffstat (limited to 'miasm2')
| -rw-r--r-- | miasm2/arch/x86/disasm.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/miasm2/arch/x86/disasm.py b/miasm2/arch/x86/disasm.py index 7185a973..e0841041 100644 --- a/miasm2/arch/x86/disasm.py +++ b/miasm2/arch/x86/disasm.py @@ -7,7 +7,14 @@ def cb_x86_callpop(mn, attrib, pool_bin, cur_bloc, offsets_to_dis, symbol_pool): """ 1000: call 1005 1005: pop + + Will give: + + 1000: push 1005 + 1005: pop + """ + if len(cur_bloc.lines) < 1: return l = cur_bloc.lines[-1] @@ -19,8 +26,8 @@ def cb_x86_callpop(mn, attrib, pool_bin, cur_bloc, offsets_to_dis, symbol_pool): if dst.name.offset != l.offset + l.l: return l.name = 'PUSH' - # cur_bloc.bto.pop() - cur_bloc.bto[0].c_bto = asm_constraint.c_next + cur_bloc.bto = set() + cur_bloc.add_cst(dst.name.offset, asm_constraint.c_next, symbol_pool) cb_x86_funcs = [cb_x86_callpop] |