about summary refs log tree commit diff stats
path: root/test/arch/x86/sem.py
diff options
context:
space:
mode:
authorAjax <commial@gmail.com>2018-07-02 17:31:59 +0200
committerAjax <commial@gmail.com>2018-07-03 14:28:18 +0200
commit68fac2e86cc61eba9adfe520fa0e04a7e8943450 (patch)
tree2be74a21b54a3111f3c18746badfb0cf1ed41149 /test/arch/x86/sem.py
parent6ef8dbb2223d0847e3822b545b249511e96a1f9b (diff)
downloadmiasm-68fac2e86cc61eba9adfe520fa0e04a7e8943450.tar.gz
miasm-68fac2e86cc61eba9adfe520fa0e04a7e8943450.zip
symbol_pool -> loc_db
Diffstat (limited to 'test/arch/x86/sem.py')
-rwxr-xr-xtest/arch/x86/sem.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/arch/x86/sem.py b/test/arch/x86/sem.py
index baa05341..23b22245 100755
--- a/test/arch/x86/sem.py
+++ b/test/arch/x86/sem.py
@@ -14,13 +14,13 @@ 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
+from miasm2.core.locationdb import LocationDB
 
 
 logging.getLogger('cpuhelper').setLevel(logging.ERROR)
 EXCLUDE_REGS = set([ir_32().IRDst, ir_64().IRDst])
 
-symbol_pool = AsmSymbolPool()
+loc_db = LocationDB()
 
 m32 = 32
 m64 = 64
@@ -38,7 +38,7 @@ def symb_exec(lbl, 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, symbol_pool, mode)
+    instr = mn.fromstring(asm, loc_db, mode)
     code = mn.asm(instr)[0]
     instr = mn.dis(code, mode)
     instr.offset = inputstate.get(EIP, 0)
@@ -48,11 +48,11 @@ def compute(ir, mode, asm, inputstate={}, debug=False):
 
 
 def compute_txt(ir, mode, txt, inputstate={}, debug=False):
-    asmcfg, symbol_pool = parse_asm.parse_txt(mn, mode, txt)
-    symbol_pool.set_offset(symbol_pool.getby_name("main"), 0x0)
-    patches = asmblock.asm_resolve_final(mn, asmcfg, symbol_pool)
-    interm = ir(symbol_pool)
-    lbl = symbol_pool.getby_name("main")
+    asmcfg, loc_db = parse_asm.parse_txt(mn, mode, txt)
+    loc_db.set_offset(loc_db.getby_name("main"), 0x0)
+    patches = asmblock.asm_resolve_final(mn, asmcfg, loc_db)
+    interm = ir(loc_db)
+    lbl = loc_db.getby_name("main")
     for bbl in asmcfg.blocks:
         interm.add_block(bbl)
     return symb_exec(lbl, interm, inputstate, debug)