diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2019-11-25 21:13:16 +0100 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2019-11-25 21:43:06 +0100 |
| commit | 029f197de9a6c471b508b171134df778e68a0ae7 (patch) | |
| tree | 3555c0acb2d92d13d6b1d017f0292cd80a226e7e | |
| parent | 2befc53c407747568ca742c007815341ef104c69 (diff) | |
| download | miasm-029f197de9a6c471b508b171134df778e68a0ae7.tar.gz miasm-029f197de9a6c471b508b171134df778e68a0ae7.zip | |
Jitter: add 'run' API
| -rw-r--r-- | example/jitter/x86_32.py | 3 | ||||
| -rw-r--r-- | 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 c2273b69..cee9241a 100644 --- a/example/jitter/x86_32.py +++ b/example/jitter/x86_32.py @@ -29,5 +29,4 @@ myjit.push_uint32_t(0x1337beef) 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 e8277e34..017dbde3 100644 --- a/miasm/jitter/jitload.py +++ b/miasm/jitter/jitload.py @@ -413,6 +413,16 @@ class Jitter(object): 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, |