From 80e40a3d2ca735db955807ad0605b43ca22e4e35 Mon Sep 17 00:00:00 2001 From: Fabrice Desclaux Date: Sat, 22 Aug 2020 12:47:01 +0200 Subject: Avoid generate default locationdb --- example/expression/asm_to_ir.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'example/expression/asm_to_ir.py') 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) -- cgit 1.4.1