about summary refs log tree commit diff stats
path: root/example/disasm/callback.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/disasm/callback.py
parentc7ca6a23768178dd49c8fe97d7c7b1e0be02cd2e (diff)
parentd314460a5a19be1f3334baedf0105d9b72fc8620 (diff)
downloadmiasm-c0afde4d7c8ff51eaa31e4a074b9e06f080b3169.tar.gz
miasm-c0afde4d7c8ff51eaa31e4a074b9e06f080b3169.zip
Merge pull request #787 from commial/feature/locationdb
LocationDB
Diffstat (limited to 'example/disasm/callback.py')
-rw-r--r--example/disasm/callback.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/example/disasm/callback.py b/example/disasm/callback.py
index a00cf5e5..b9a09c09 100644
--- a/example/disasm/callback.py
+++ b/example/disasm/callback.py
@@ -3,7 +3,7 @@ from miasm2.core.asmblock import AsmConstraint
 from miasm2.arch.x86.disasm import dis_x86_32, cb_x86_funcs
 
 
-def cb_x86_callpop(cur_bloc, symbol_pool, *args, **kwargs):
+def cb_x86_callpop(cur_bloc, loc_db, *args, **kwargs):
     """
     1000: call 1005
     1005: pop
@@ -27,7 +27,7 @@ def cb_x86_callpop(cur_bloc, symbol_pool, *args, **kwargs):
         return
 
     loc_key = dst.loc_key
-    offset = symbol_pool.loc_key_to_offset(loc_key)
+    offset = loc_db.get_location_offset(loc_key)
     ## The destination must be the next instruction
     if offset != last_instr.offset + last_instr.l:
         return