diff options
| -rw-r--r-- | miasm2/analysis/debugging.py | 4 | ||||
| -rw-r--r-- | miasm2/jitter/jitload.py | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/miasm2/analysis/debugging.py b/miasm2/analysis/debugging.py index 74551a72..d970f848 100644 --- a/miasm2/analysis/debugging.py +++ b/miasm2/analysis/debugging.py @@ -167,8 +167,8 @@ class Debugguer(object): "Step in jit" self.myjit.jit.set_options(jit_maxline=1) - self.myjit.jit.addr_mod = interval([(self.myjit.pc, self.myjit.pc)]) - self.myjit.jit.updt_automod_code(self.myjit.vm) + # Reset all jitted blocks + self.myjit.jit.clear_jitted_blocks() res = self.myjit.continue_run(step=True) self.handle_exception(res) diff --git a/miasm2/jitter/jitload.py b/miasm2/jitter/jitload.py index 7213d73c..a035445b 100644 --- a/miasm2/jitter/jitload.py +++ b/miasm2/jitter/jitload.py @@ -8,6 +8,7 @@ from miasm2.jitter.csts import * from miasm2.core.utils import * from miasm2.core.bin_stream import bin_stream_vm from miasm2.ir.ir2C import init_arch_C +from miasm2.core.interval import interval hnd = logging.StreamHandler() hnd.setFormatter(logging.Formatter("[%(levelname)s]: %(message)s")) @@ -261,6 +262,10 @@ class jitter: """ self.breakpoints_handler.add_callback(addr, callback) self.jit.add_disassembly_splits(addr) + # De-jit previously jitted blocks + self.jit.addr_mod = interval([(addr, addr)]) + self.jit.updt_automod_code(self.vm) + def set_breakpoint(self, addr, *args): """Set callbacks associated with addr. |