From aaa58042e3c7fc75e97ed7b9eaf4e4ce07b75d7d Mon Sep 17 00:00:00 2001 From: Ajax Date: Thu, 23 Jun 2016 17:26:15 +0200 Subject: Handle exceptions due to breakpoint side effects For instance, a `set_mem` may raise an automod handler --- miasm2/jitter/jitload.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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: -- cgit 1.4.1