diff options
Diffstat (limited to 'example/expression/asm_to_ir.py')
| -rw-r--r-- | example/expression/asm_to_ir.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/example/expression/asm_to_ir.py b/example/expression/asm_to_ir.py index 83eac728..edc23437 100644 --- a/example/expression/asm_to_ir.py +++ b/example/expression/asm_to_ir.py @@ -9,10 +9,13 @@ from miasm.expression.expression import * from miasm.core import asmblock from miasm.arch.x86.ira import ir_a_x86_32 from miasm.analysis.data_flow import DeadRemoval +from miasm.core.locationdb import LocationDB # First, asm code -asmcfg, loc_db = parse_asm.parse_txt(mn_x86, 32, ''' +loc_db = LocationDB() +asmcfg = parse_asm.parse_txt( + mn_x86, 32, ''' main: MOV EAX, 1 MOV EBX, 2 @@ -25,7 +28,9 @@ loop: ADD EAX, ECX JZ loop RET -''') +''', + loc_db +) loc_db.set_location_offset(loc_db.get_name_location("main"), 0x0) |