diff options
| author | Camille Mougey <commial@gmail.com> | 2018-05-14 13:53:04 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-14 13:53:04 +0200 |
| commit | d7c7527fbc4dea0f340402b62e7146b1d1916d2a (patch) | |
| tree | 45413ece50186f74a046ef2e2f30b4df8a19b963 /test/arch/arm/sem.py | |
| parent | f6e1c074f6a17b6a895dcf5352c213a1b6bacb99 (diff) | |
| parent | ab3635f44ab45e22150bc373e33b7cf11ea46f63 (diff) | |
| download | miasm-d7c7527fbc4dea0f340402b62e7146b1d1916d2a.tar.gz miasm-d7c7527fbc4dea0f340402b62e7146b1d1916d2a.zip | |
Merge pull request #734 from serpilliere/enhance_parser
Enhance parser
Diffstat (limited to 'test/arch/arm/sem.py')
| -rwxr-xr-x | test/arch/arm/sem.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/arch/arm/sem.py b/test/arch/arm/sem.py index 1b14214e..d9e6aa76 100755 --- a/test/arch/arm/sem.py +++ b/test/arch/arm/sem.py @@ -9,11 +9,13 @@ from miasm2.arch.arm.arch import mn_arm as mn from miasm2.arch.arm.sem import ir_arml as ir_arch from miasm2.arch.arm.regs import * from miasm2.expression.expression import * +from miasm2.core.asmblock import AsmSymbolPool from pdb import pm logging.getLogger('cpuhelper').setLevel(logging.ERROR) EXCLUDE_REGS = set([ir_arch().IRDst]) +symbol_pool = AsmSymbolPool() def M(addr): return ExprMem(ExprInt(addr, 16), 16) @@ -24,7 +26,7 @@ def compute(asm, inputstate={}, debug=False): sympool.update({k: ExprInt(v, k.size) for k, v in inputstate.iteritems()}) interm = ir_arch() symexec = SymbolicExecutionEngine(interm, sympool) - instr = mn.fromstring(asm, "l") + instr = mn.fromstring(asm, symbol_pool, "l") code = mn.asm(instr)[0] instr = mn.dis(code, "l") instr.offset = inputstate.get(PC, 0) |