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>2020-06-10 13:47:33 +0200
committerGitHub <noreply@github.com>2020-06-10 13:47:33 +0200
commit975a527b4f268c4e41ab5ab259442c0941da6709 (patch)
tree9f14825d859aed095defcd087ade07f8389fd873 /example/disasm/callback.py
parent030d19ae958b40e52dd8dfe4475fc181eae1480e (diff)
parentae30dd263f043b9311294ba20cfacac0a5de32d1 (diff)
downloadfocaccia-miasm-975a527b4f268c4e41ab5ab259442c0941da6709.tar.gz
focaccia-miasm-975a527b4f268c4e41ab5ab259442c0941da6709.zip
Merge pull request #1252 from serpilliere/api_dis_callback
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