Skip to content

Commit

Permalink
Jitter: add 'run' API
Browse files Browse the repository at this point in the history
  • Loading branch information
serpilliere committed Nov 25, 2019
1 parent 2befc53 commit 029f197
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
3 changes: 1 addition & 2 deletions example/jitter/x86_32.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
10 changes: 10 additions & 0 deletions miasm/jitter/jitload.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 029f197

Please sign in to comment.