about summary refs log tree commit diff stats
path: root/miasm2/jitter/jitload.py
diff options
context:
space:
mode:
authorserpilliere <fabrice.desclaux@cea.fr>2015-04-05 23:48:24 +0200
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2015-04-22 11:31:21 +0200
commit65feb2335c3fd525efde115932b512e7bbc720d1 (patch)
treed945f7f094beb6be3c822b67d06bb888f2e67712 /miasm2/jitter/jitload.py
parente6676c92ea2ea3e1f69c10902313094c1b83e375 (diff)
downloadmiasm-65feb2335c3fd525efde115932b512e7bbc720d1.tar.gz
miasm-65feb2335c3fd525efde115932b512e7bbc720d1.zip
Jitter: get/set mem is now wrapped in cpu
The get/set mem used during jit is wrapped by cpu. This allows cpu object to
callback (or not, depending on arch) a cache update.
Diffstat (limited to '')
-rw-r--r--miasm2/jitter/jitload.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/miasm2/jitter/jitload.py b/miasm2/jitter/jitload.py
index 97fd3c80..6faa3a9f 100644
--- a/miasm2/jitter/jitload.py
+++ b/miasm2/jitter/jitload.py
@@ -217,9 +217,12 @@ class jitter:
         self.vm.set_addr2obj(self.jit.addr2obj)
 
         self.jit.load()
+        self.cpu.vmmngr = self.vm
+        self.cpu.jitter = self.jit
         self.stack_size = 0x10000
         self.stack_base = 0x1230000
 
+
         # Init callback handler
         self.breakpoints_handler = CallbackHandler()
         self.exceptions_handler = CallbackHandlerBitflag()
@@ -231,10 +234,8 @@ class jitter:
 
         def exception_automod(jitter):
             "Tell the JiT backend to update blocs modified"
-            addr = self.vm.get_last_write_ad()
-            size = self.vm.get_last_write_size()
 
-            self.jit.updt_automod_code(self.vm, addr, size)
+            self.jit.updt_automod_code(jitter.vm)
             self.vm.set_exception(0)
 
             return True