diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2016-11-10 11:14:13 +0100 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2016-11-10 11:14:13 +0100 |
| commit | 0aa399dd85f33de8334e2ebc579cc336acf9a7d3 (patch) | |
| tree | 43f5d8678b8c664649db42ce2b1c983ae0d02e26 /miasm2/jitter/jitcore.py | |
| parent | 9821e83e79a45e45a99ed89eb8951bd278cc83d8 (diff) | |
| download | miasm-0aa399dd85f33de8334e2ebc579cc336acf9a7d3.tar.gz miasm-0aa399dd85f33de8334e2ebc579cc336acf9a7d3.zip | |
Jitter: Add max exec per jit call option
Diffstat (limited to 'miasm2/jitter/jitcore.py')
| -rw-r--r-- | miasm2/jitter/jitcore.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/miasm2/jitter/jitcore.py b/miasm2/jitter/jitcore.py index 04bd707a..f3a79bee 100644 --- a/miasm2/jitter/jitcore.py +++ b/miasm2/jitter/jitcore.py @@ -51,7 +51,8 @@ class JitCore(object): self.blocs_mem_interval = interval() self.disasm_cb = None self.split_dis = set() - self.options = {"jit_maxline": 50 # Maximum number of line jitted + self.options = {"jit_maxline": 50, # Maximum number of line jitted + "max_exec_per_call": 0 # 0 means no limit } self.mdis = asmbloc.disasmEngine(ir_arch.arch, ir_arch.attrib, bs, @@ -170,7 +171,8 @@ class JitCore(object): @cpu: JitCpu instance @breakpoints: Dict instance of used breakpoints """ - return self.exec_wrapper(label, cpu, self.lbl2jitbloc.data, breakpoints) + return self.exec_wrapper(label, cpu, self.lbl2jitbloc.data, breakpoints, + self.options["max_exec_per_call"]) def runbloc(self, cpu, vm, lbl, breakpoints): """Run the bloc starting at lbl. |