about summary refs log tree commit diff stats
path: root/example/symbol_exec
diff options
context:
space:
mode:
Diffstat (limited to 'example/symbol_exec')
-rw-r--r--example/symbol_exec/depgraph.py2
-rw-r--r--example/symbol_exec/single_instr.py12
2 files changed, 6 insertions, 8 deletions
diff --git a/example/symbol_exec/depgraph.py b/example/symbol_exec/depgraph.py
index 621e8fca..88540a83 100644
--- a/example/symbol_exec/depgraph.py
+++ b/example/symbol_exec/depgraph.py
@@ -47,7 +47,7 @@ for element in args.element:
         raise ValueError("Unknown element '%s'" % element)
 
 mdis = machine.dis_engine(cont.bin_stream, dont_dis_nulstart_bloc=True)
-ir_arch = machine.ira(mdis.symbol_pool)
+ir_arch = machine.ira(mdis.loc_db)
 
 # Common argument forms
 init_ctx = {}
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