about summary refs log tree commit diff stats
path: root/example/expression/asm_to_ir.py
diff options
context:
space:
mode:
authorserpilliere <serpilliere@users.noreply.github.com>2018-07-03 14:34:41 +0200
committerGitHub <noreply@github.com>2018-07-03 14:34:41 +0200
commitc0afde4d7c8ff51eaa31e4a074b9e06f080b3169 (patch)
tree967c5856dcf37980cf80a2ea48cc7ee0e008e1bd /example/expression/asm_to_ir.py
parentc7ca6a23768178dd49c8fe97d7c7b1e0be02cd2e (diff)
parentd314460a5a19be1f3334baedf0105d9b72fc8620 (diff)
downloadmiasm-c0afde4d7c8ff51eaa31e4a074b9e06f080b3169.tar.gz
miasm-c0afde4d7c8ff51eaa31e4a074b9e06f080b3169.zip
Merge pull request #787 from commial/feature/locationdb
LocationDB
Diffstat (limited to '')
-rw-r--r--example/expression/asm_to_ir.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/example/expression/asm_to_ir.py b/example/expression/asm_to_ir.py
index 36965bfa..6db07e9b 100644
--- a/example/expression/asm_to_ir.py
+++ b/example/expression/asm_to_ir.py
@@ -8,7 +8,7 @@ from miasm2.arch.x86.ira import ir_a_x86_32
 from miasm2.analysis.data_flow import dead_simp
 
 # First, asm code
-asmcfg, symbol_pool = parse_asm.parse_txt(mn_x86, 32, '''
+asmcfg, loc_db = parse_asm.parse_txt(mn_x86, 32, '''
 main:
    MOV    EAX, 1
    MOV    EBX, 2
@@ -24,17 +24,17 @@ loop:
 ''')
 
 
-symbol_pool.set_offset(symbol_pool.getby_name("main"), 0x0)
+loc_db.set_location_offset(loc_db.get_name_location("main"), 0x0)
 for block in asmcfg.blocks:
     print block
 
 
 print "symbols:"
-print symbol_pool
-patches = asmblock.asm_resolve_final(mn_x86, asmcfg, symbol_pool)
+print loc_db
+patches = asmblock.asm_resolve_final(mn_x86, asmcfg, loc_db)
 
 # Translate to IR
-ir_arch = ir_a_x86_32(symbol_pool)
+ir_arch = ir_a_x86_32(loc_db)
 for block in asmcfg.blocks:
     print 'add block'
     print block