From 029f197de9a6c471b508b171134df778e68a0ae7 Mon Sep 17 00:00:00 2001 From: Fabrice Desclaux Date: Mon, 25 Nov 2019 21:13:16 +0100 Subject: [PATCH] Jitter: add 'run' API --- example/jitter/x86_32.py | 3 +-- miasm/jitter/jitload.py | 10 ++++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/example/jitter/x86_32.py b/example/jitter/x86_32.py index c2273b690..cee9241af 100644 --- a/example/jitter/x86_32.py +++ b/example/jitter/x86_32.py @@ -29,5 +29,4 @@ def code_sentinelle(jitter): myjit.add_breakpoint(0x1337beef, code_sentinelle) -myjit.init_run(run_addr) -myjit.continue_run() +myjit.run(run_addr) diff --git a/miasm/jitter/jitload.py b/miasm/jitter/jitload.py index e8277e346..017dbde3d 100644 --- a/miasm/jitter/jitload.py +++ b/miasm/jitter/jitload.py @@ -413,6 +413,16 @@ def continue_run(self, step=False): return None + + def run(self, addr): + """ + Launch emulation + @addr: (int) start address + """ + self.init_run(addr) + return self.continue_run() + + def init_stack(self): self.vm.add_memory_page( self.stack_base,