Debugging loop: handle event / dispatch to breakpoint. Returns when all targets are dead/detached
(self)
| 889 | |
| 890 | ## Public API |
| 891 | def loop(self): |
| 892 | """Debugging loop: handle event / dispatch to breakpoint. Returns when all targets are dead/detached""" |
| 893 | for debug_event in self._debug_event_generator(): |
| 894 | dbg_continue_flag = self._dispatch_debug_event(debug_event) |
| 895 | if dbg_continue_flag is None: |
| 896 | dbg_continue_flag = DBG_CONTINUE |
| 897 | if debug_event.dwDebugEventCode == EXIT_PROCESS_DEBUG_EVENT or not self._killed_in_action(): |
| 898 | #if not self._killed_in_action(): |
| 899 | # should we always _finish_debug_event even if process was killed ? |
| 900 | # rhaaa _killed_in_action is a REALLY bad name, it's not killed, it's detached |
| 901 | # TODO: FIXME |
| 902 | self._finish_debug_event(debug_event, dbg_continue_flag) |
| 903 | if not self.processes: |
| 904 | break |
| 905 | |
| 906 | def add_bp(self, bp, addr=None, type=None, target=None): |
| 907 | """Add a breakpoint, bp can be: |
nothing calls this directly
no test coverage detected