Skip to content

Commit 3fe7ee2

Browse files
committed
Fix bug in debugger caused by on_setup new code
1 parent 370210a commit 3fe7ee2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

windows/debug/debugger.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ def _update_debugger_state(self, debug_event):
193193
self.current_thread = self.threads[debug_event.dwThreadId]
194194

195195
def _dispatch_debug_event(self, debug_event):
196-
#print("DISPATCH {0}".format(DEBUG_EVENT.KNOWN_EVENT_CODE.get(debug_event.dwDebugEventCode)))
197196
handler = self._DebugEventCode_dispatch.get(debug_event.dwDebugEventCode, self._handle_unknown_debug_event)
198197
return handler(debug_event)
199198

@@ -498,14 +497,15 @@ def _handle_unknown_debug_event(self, debug_event):
498497
def _handle_exception_breakpoint(self, exception, excp_addr):
499498
excp_bitness = self.get_exception_bitness(exception)
500499
# Sub-method _do_setup() ?
500+
dbg_has_setup = None
501501
if not self.first_bp_encoutered:
502502
dbg_has_setup = not getattr(self.on_setup, "_abstract_on_setup_", False)
503503
self.first_bp_encoutered = True
504504
if dbg_has_setup:
505505
with self.DisabledMemoryBreakpoint():
506506
continue_flag = self.on_setup() # Handle single-step here ?
507507
# Check killed in action ?
508-
# What if setup + BP object()
508+
# What if setup + BP object() ?
509509
if excp_addr in self.breakpoints[self.current_process.pid]:
510510
thread = self.current_thread
511511
if self.current_process.bitness == 32 and excp_bitness == 64:

0 commit comments

Comments
 (0)