about summary refs log tree commit diff stats
path: root/miasm2/jitter/codegen.py
diff options
context:
space:
mode:
authorCamille Mougey <commial@gmail.com>2016-09-01 11:09:21 +0200
committerGitHub <noreply@github.com>2016-09-01 11:09:21 +0200
commit9f135c02e9bce299a700fa0191388542d141ea22 (patch)
treed8ad86407e24ae9435ca4ca344ae7ec61e8568d2 /miasm2/jitter/codegen.py
parentfb7501f4bb0bc77a0262ad4894732e4de6ccb2b2 (diff)
parent2858e916f35f0469baeea23632ddd8befdd7ca5d (diff)
downloadmiasm-9f135c02e9bce299a700fa0191388542d141ea22.tar.gz
miasm-9f135c02e9bce299a700fa0191388542d141ea22.zip
Merge pull request #411 from serpilliere/fix_memory_breakpoint
Fix memory breakpoint
Diffstat (limited to 'miasm2/jitter/codegen.py')
-rw-r--r--miasm2/jitter/codegen.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/miasm2/jitter/codegen.py b/miasm2/jitter/codegen.py
index 068839e7..7630a2ef 100644
--- a/miasm2/jitter/codegen.py
+++ b/miasm2/jitter/codegen.py
@@ -89,6 +89,8 @@ class CGen(object):
     """
 
     CODE_VM_EXCEPTION_POST_INSTR = r"""
+    check_memory_breakpoint(&(jitcpu->pyvm->vm_mngr));
+    check_invalid_code_blocs(&(jitcpu->pyvm->vm_mngr));
     if (VM_exception_flag) {
         %s = %s;
         BlockDst->address = DST_value;
@@ -332,7 +334,7 @@ class CGen(object):
             out += (self.CODE_CPU_EXCEPTION_POST_INSTR % (self.C_PC, dst)).split('\n')
 
         if attrib.mem_read | attrib.mem_write:
-            out.append("reset_code_bloc_write(&((VmMngr*)jitcpu->pyvm)->vm_mngr);")
+            out.append("reset_memory_access(&(jitcpu->pyvm->vm_mngr));")
 
         return out