diff options
| author | Ajax <commial@gmail.com> | 2018-06-22 17:27:30 +0200 |
|---|---|---|
| committer | Ajax <commial@gmail.com> | 2018-06-22 18:34:07 +0200 |
| commit | c33f2d988bda28a1b6dbe5a2c8bceb5819db9e42 (patch) | |
| tree | b05c169e5ff17c800a2692e0d0ddc09bb34fb881 /miasm2/jitter/jitcore.py | |
| parent | f5aa0474bd7ea8078bacf0085ff6942d1cf3bc42 (diff) | |
| download | miasm-c33f2d988bda28a1b6dbe5a2c8bceb5819db9e42.tar.gz miasm-c33f2d988bda28a1b6dbe5a2c8bceb5819db9e42.zip | |
Jitcore: run_at actually takes a list of stop_offset, instead of a
"breakpoints" specificity
Diffstat (limited to 'miasm2/jitter/jitcore.py')
| -rw-r--r-- | miasm2/jitter/jitcore.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/miasm2/jitter/jitcore.py b/miasm2/jitter/jitcore.py index 77defa30..b636782d 100644 --- a/miasm2/jitter/jitcore.py +++ b/miasm2/jitter/jitcore.py @@ -166,10 +166,16 @@ class JitCore(object): self.add_block_to_mem_interval(vm, cur_block) return cur_block - def run_at(self, cpu, offset, breakpoints): - """Run from the starting address @offset + def run_at(self, cpu, offset, stop_offsets): + """Run from the starting address @offset. + Execution will stop if: + - max_exec_per_call option is reached + - a new, yet unknown, block is reached after the execution of block at + address @offset + - an address in @stop_offsets is reached @cpu: JitCpu instance - @offset: target offset + @offset: starting address (int) + @stop_offsets: set of address on which the jitter must stop """ if offset is None: @@ -189,7 +195,8 @@ class JitCore(object): return offset # Run the block and update cpu/vmmngr state - return self.exec_wrapper(offset, cpu, self.offset_to_jitted_func.data, breakpoints, + return self.exec_wrapper(offset, cpu, self.offset_to_jitted_func.data, + stop_offsets, self.options["max_exec_per_call"]) def blocks_to_memrange(self, blocks): |