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-08-30 15:51:08 +0200
committerGitHub <noreply@github.com>2016-08-30 15:51:08 +0200
commitfb7501f4bb0bc77a0262ad4894732e4de6ccb2b2 (patch)
tree7adf01b3e3c7455f8977b7540956bc976084e996 /miasm2/jitter/codegen.py
parent5b1d3da254338e5d90923fcfb45951c5716443fd (diff)
parent0228bc58b2b1bf17d5fa8cbc3c622eb2882a93a9 (diff)
downloadmiasm-fb7501f4bb0bc77a0262ad4894732e4de6ccb2b2.tar.gz
miasm-fb7501f4bb0bc77a0262ad4894732e4de6ccb2b2.zip
Merge pull request #410 from serpilliere/automod_C_callback
Automod c callback
Diffstat (limited to 'miasm2/jitter/codegen.py')
-rw-r--r--miasm2/jitter/codegen.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/miasm2/jitter/codegen.py b/miasm2/jitter/codegen.py
index 7bdbf890..068839e7 100644
--- a/miasm2/jitter/codegen.py
+++ b/miasm2/jitter/codegen.py
@@ -331,6 +331,9 @@ class CGen(object):
         if attrib.set_exception or attrib.op_set_exception:
             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);")
+
         return out
 
     def gen_pre_code(self, attrib):