about summary refs log tree commit diff stats
path: root/example/disasm/callback.py
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2020-06-09 18:42:04 +0200
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2020-06-10 11:27:12 +0200
commitae30dd263f043b9311294ba20cfacac0a5de32d1 (patch)
tree89089283782a1ce2f797f72e0f5760c75163ab2a /example/disasm/callback.py
parentdd2fd9c8e424463591782472192627cfdbe397f5 (diff)
downloadmiasm-ae30dd263f043b9311294ba20cfacac0a5de32d1.tar.gz
miasm-ae30dd263f043b9311294ba20cfacac0a5de32d1.zip
Updt dis_block_callback; apply_splitting
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 7219462f..1498b11e 100644
--- a/example/disasm/callback.py
+++ b/example/disasm/callback.py
@@ -4,7 +4,7 @@ from miasm.analysis.machine import Machine
 from miasm.core.asmblock import AsmConstraint
 
 
-def cb_x86_callpop(cur_bloc, loc_db, *args, **kwargs):
+def cb_x86_callpop(mdis, cur_bloc, offset_to_dis):
     """
     1000: call 1005
     1005: pop
@@ -28,7 +28,7 @@ def cb_x86_callpop(cur_bloc, loc_db, *args, **kwargs):
         return
 
     loc_key = dst.loc_key
-    offset = loc_db.get_location_offset(loc_key)
+    offset = mdis.loc_db.get_location_offset(loc_key)
     ## The destination must be the next instruction
     if offset != last_instr.offset + last_instr.l:
         return