diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2018-05-05 23:13:12 +0200 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2018-05-14 10:29:27 +0200 |
| commit | 94d49ed54f07e3d399de74de13f5422837c031fa (patch) | |
| tree | b3f7fd34c7ff8d17bd9f26d53511b30935485092 /test/arch/x86/sem.py | |
| parent | db4fd7f58d6a4ed87fc7d6f28c7c2af31e61fb65 (diff) | |
| download | miasm-94d49ed54f07e3d399de74de13f5422837c031fa.tar.gz miasm-94d49ed54f07e3d399de74de13f5422837c031fa.zip | |
Core: updt parser structure
Diffstat (limited to 'test/arch/x86/sem.py')
| -rwxr-xr-x | test/arch/x86/sem.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/arch/x86/sem.py b/test/arch/x86/sem.py index eb3c15c0..b3b7e940 100755 --- a/test/arch/x86/sem.py +++ b/test/arch/x86/sem.py @@ -14,11 +14,14 @@ from miasm2.arch.x86.regs import * from miasm2.expression.expression import * from miasm2.expression.simplifications import expr_simp from miasm2.core import parse_asm, asmblock +from miasm2.core.asmblock import AsmSymbolPool logging.getLogger('cpuhelper').setLevel(logging.ERROR) EXCLUDE_REGS = set([ir_32().IRDst, ir_64().IRDst]) +symbol_pool = AsmSymbolPool() + m32 = 32 m64 = 64 @@ -35,7 +38,7 @@ def symb_exec(interm, inputstate, debug): if k not in EXCLUDE_REGS and regs_init.get(k, None) != v} def compute(ir, mode, asm, inputstate={}, debug=False): - instr = mn.fromstring(asm, mode) + instr = mn.fromstring(asm, symbol_pool, mode) code = mn.asm(instr)[0] instr = mn.dis(code, mode) instr.offset = inputstate.get(EIP, 0) |