From 61551fa78e9dd22ed1f982b4fe171fd6383c39a6 Mon Sep 17 00:00:00 2001 From: Fabrice Desclaux Date: Fri, 18 May 2018 14:43:57 +0200 Subject: Core: replace AsmLabel by LocKey --- example/jitter/unpack_upx.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'example/jitter/unpack_upx.py') diff --git a/example/jitter/unpack_upx.py b/example/jitter/unpack_upx.py index f9b0aed1..b86724d6 100644 --- a/example/jitter/unpack_upx.py +++ b/example/jitter/unpack_upx.py @@ -59,10 +59,11 @@ leaves = list(ab.get_bad_blocks_predecessors()) assert(len(leaves) == 1) l = leaves.pop() logging.info(l) -end_label = l.label.offset -logging.info('final label') -logging.info(end_label) +end_loc_key = mdis.symbol_pool.loc_key_to_offset(l) + +logging.info('final loc_key') +logging.info(end_loc_key) # Export CFG graph (dot format) if options.graph is True: @@ -85,7 +86,7 @@ def update_binary(jitter): return False # Set callbacks -sb.jitter.add_breakpoint(end_label, update_binary) +sb.jitter.add_breakpoint(end_loc_key, update_binary) # Run sb.run() -- cgit 1.4.1