about summary refs log tree commit diff stats
path: root/miasm2/jitter/jitcore_python.py
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2017-04-14 23:04:46 +0200
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2017-04-20 12:36:51 +0200
commit4d511eab15845e519e5a8b0d9f742a550768b709 (patch)
tree418429f7a3cdedf5efdf074126bc76dbd04f9657 /miasm2/jitter/jitcore_python.py
parenta9b3d7f1a9014336b46c6dca20332a6deaccfc6d (diff)
downloadfocaccia-miasm-4d511eab15845e519e5a8b0d9f742a550768b709.tar.gz
focaccia-miasm-4d511eab15845e519e5a8b0d9f742a550768b709.zip
IRBlock: move lines in AssignBlock
Diffstat (limited to 'miasm2/jitter/jitcore_python.py')
-rw-r--r--miasm2/jitter/jitcore_python.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/miasm2/jitter/jitcore_python.py b/miasm2/jitter/jitcore_python.py
index cbd582ab..6d954aae 100644
--- a/miasm2/jitter/jitcore_python.py
+++ b/miasm2/jitter/jitcore_python.py
@@ -72,18 +72,18 @@ class JitCore_Python(jitcore.JitCore):
                 exec_engine.update_engine_from_cpu()
 
                 # Execute current ir bloc
-                for ir, line in zip(irb.irs, irb.lines):
-
+                for assignblk in irb.irs:
+                    instr = assignblk.instr
                     # For each new instruction (in assembly)
-                    if line.offset not in offsets_jitted:
+                    if instr.offset not in offsets_jitted:
                         # Test exceptions
                         vmmngr.check_invalid_code_blocs()
                         vmmngr.check_memory_breakpoint()
                         if vmmngr.get_exception():
                             exec_engine.update_cpu_from_engine()
-                            return line.offset
+                            return instr.offset
 
-                        offsets_jitted.add(line.offset)
+                        offsets_jitted.add(instr.offset)
 
                         # Log registers values
                         if self.log_regs:
@@ -92,21 +92,21 @@ class JitCore_Python(jitcore.JitCore):
 
                         # Log instruction
                         if self.log_mn:
-                            print "%08x %s" % (line.offset, line)
+                            print "%08x %s" % (instr.offset, instr)
 
                         # Check for exception
                         if (vmmngr.get_exception() != 0 or
                             cpu.get_exception() != 0):
                             exec_engine.update_cpu_from_engine()
-                            return line.offset
+                            return instr.offset
 
                     # Eval current instruction (in IR)
-                    exec_engine.eval_ir(ir)
+                    exec_engine.eval_ir(assignblk)
                     # Check for exceptions which do not update PC
                     exec_engine.update_cpu_from_engine()
                     if (vmmngr.get_exception() & csts.EXCEPT_DO_NOT_UPDATE_PC != 0 or
                         cpu.get_exception() > csts.EXCEPT_NUM_UPDT_EIP):
-                        return line.offset
+                        return instr.offset
 
                 vmmngr.check_invalid_code_blocs()
                 vmmngr.check_memory_breakpoint()