diff options
| author | Ajax <commial@gmail.com> | 2016-06-23 17:26:15 +0200 |
|---|---|---|
| committer | Ajax <commial@gmail.com> | 2016-06-23 17:26:15 +0200 |
| commit | aaa58042e3c7fc75e97ed7b9eaf4e4ce07b75d7d (patch) | |
| tree | e21b08266a9b649193617501563e37b9bb9bf391 | |
| parent | 655f7ec3f52ceb375b43a0f22f9a9af9ff1113ae (diff) | |
| download | miasm-aaa58042e3c7fc75e97ed7b9eaf4e4ce07b75d7d.tar.gz miasm-aaa58042e3c7fc75e97ed7b9eaf4e4ce07b75d7d.zip | |
Handle exceptions due to breakpoint side effects
For instance, a `set_mem` may raise an automod handler
| -rw-r--r-- | miasm2/jitter/jitload.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/miasm2/jitter/jitload.py b/miasm2/jitter/jitload.py index abc31840..2371067d 100644 --- a/miasm2/jitter/jitload.py +++ b/miasm2/jitter/jitload.py @@ -315,6 +315,11 @@ class jitter: yield tmp else: yield res + + # Check exceptions (raised by breakpoints) + exception_flag = self.get_exception() + for res in self.exceptions_handler(exception_flag, self): + if res is not True: yield res # If a callback changed pc, re call every callback @@ -327,7 +332,7 @@ class jitter: # Run the bloc at PC self.pc = self.runbloc(self.pc) - # Check exceptions + # Check exceptions (raised by the execution of the block) exception_flag = self.get_exception() for res in self.exceptions_handler(exception_flag, self): if res is not True: |