about summary refs log tree commit diff stats
path: root/example/symbol_exec/single_instr.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 /example/symbol_exec/single_instr.py
parent6ef8dbb2223d0847e3822b545b249511e96a1f9b (diff)
downloadmiasm-68fac2e86cc61eba9adfe520fa0e04a7e8943450.tar.gz
miasm-68fac2e86cc61eba9adfe520fa0e04a7e8943450.zip
symbol_pool -> loc_db
Diffstat (limited to 'example/symbol_exec/single_instr.py')
-rw-r--r--example/symbol_exec/single_instr.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/example/symbol_exec/single_instr.py b/example/symbol_exec/single_instr.py
index 22a48fc6..fd454212 100644
--- a/example/symbol_exec/single_instr.py
+++ b/example/symbol_exec/single_instr.py
@@ -2,27 +2,25 @@
 from miasm2.core.bin_stream import bin_stream_str
 from miasm2.ir.symbexec import SymbolicExecutionEngine
 from miasm2.analysis.machine import Machine
-from miasm2.core.asmblock import AsmSymbolPool
+from miasm2.core.locationdb import LocationDB
 
 START_ADDR = 0
 machine = Machine("x86_32")
-
-symbol_pool = AsmSymbolPool()
-
+loc_db = LocationDB()
 
 # Assemble and disassemble a MOV
 ## Ensure that attributes 'offset' and 'l' are set
-line = machine.mn.fromstring("MOV EAX, EBX", symbol_pool, 32)
+line = machine.mn.fromstring("MOV EAX, EBX", loc_db, 32)
 asm = machine.mn.asm(line)[0]
 
 # Get back block
 bin_stream = bin_stream_str(asm)
-mdis = machine.dis_engine(bin_stream, symbol_pool=symbol_pool)
+mdis = machine.dis_engine(bin_stream, loc_db=loc_db)
 mdis.lines_wd = 1
 asm_block = mdis.dis_block(START_ADDR)
 
 # Translate ASM -> IR
-ira = machine.ira(mdis.symbol_pool)
+ira = machine.ira(mdis.loc_db)
 ira.add_block(asm_block)
 
 # Instanciate a Symbolic Execution engine with default value for registers