diff options
| author | Camille Mougey <commial@gmail.com> | 2017-04-20 12:58:40 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-04-20 12:58:40 +0200 |
| commit | 4f5206dd8774a82ed2c864f4e6fe2d512f9d4408 (patch) | |
| tree | 418429f7a3cdedf5efdf074126bc76dbd04f9657 /miasm2/jitter/jitcore_python.py | |
| parent | ff981a11ef71960a239ec44295f06bb384124521 (diff) | |
| parent | 4d511eab15845e519e5a8b0d9f742a550768b709 (diff) | |
| download | miasm-4f5206dd8774a82ed2c864f4e6fe2d512f9d4408.tar.gz miasm-4f5206dd8774a82ed2c864f4e6fe2d512f9d4408.zip | |
Merge pull request #528 from serpilliere/assignblock_ro
Assignblock ro
Diffstat (limited to 'miasm2/jitter/jitcore_python.py')
| -rw-r--r-- | miasm2/jitter/jitcore_python.py | 18 |
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() |