diff options
| author | Ajax <commial@gmail.com> | 2015-11-09 14:20:36 +0100 |
|---|---|---|
| committer | Ajax <commial@gmail.com> | 2015-11-09 14:20:36 +0100 |
| commit | 1ae7dfe4130c8ea023addd8993241f26efc04f54 (patch) | |
| tree | 17fa65294898773007765cba48bc1c08aed1ef28 /miasm2/arch/x86/disasm.py | |
| parent | f6dcdced5bfdb1ae32613df194890d70a03da4b8 (diff) | |
| download | miasm-1ae7dfe4130c8ea023addd8993241f26efc04f54.tar.gz miasm-1ae7dfe4130c8ea023addd8993241f26efc04f54.zip | |
Disasm/x86: move `pushpop` callback to an example `callback.py`
Diffstat (limited to 'miasm2/arch/x86/disasm.py')
| -rw-r--r-- | miasm2/arch/x86/disasm.py | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/miasm2/arch/x86/disasm.py b/miasm2/arch/x86/disasm.py index 6d144944..0ff55097 100644 --- a/miasm2/arch/x86/disasm.py +++ b/miasm2/arch/x86/disasm.py @@ -1,35 +1,8 @@ -from miasm2.core.asmbloc import asm_constraint, asm_label, disasmEngine -from miasm2.expression.expression import ExprId +from miasm2.core.asmbloc import disasmEngine from miasm2.arch.x86.arch import mn_x86 -def cb_x86_callpop(cur_bloc, *args, **kwargs): - """ - 1000: call 1005 - 1005: pop - - Will give: - - 1000: push 1005 - 1005: pop - - """ - if len(cur_bloc.lines) < 1: - return - l = cur_bloc.lines[-1] - if l.name != 'CALL': - return - dst = l.args[0] - if not (isinstance(dst, ExprId) and isinstance(dst.name, asm_label)): - return - if dst.name.offset != l.offset + l.l: - return - l.name = 'PUSH' - cur_bloc.bto = set() - cur_bloc.add_cst(dst.name.offset, asm_constraint.c_next, symbol_pool) - - -cb_x86_funcs = [cb_x86_callpop] +cb_x86_funcs = [] def cb_x86_disasm(*args, **kwargs): |