def _send_paused_notification(self, process): self._update_stop_thread(process) self._debugger_store.thread_manager.update(process) thread = process.GetSelectedThread() output = 'Debugger paused at thread(%d) because of: %s' % ( thread.GetThreadID(), self._debugger_store.thread_manager.get_thread_stop_description( thread)) self._send_user_output('log', output) threadSwitchMessage = self._debugger_store.thread_manager.get_thread_switch_message( ) if threadSwitchMessage: self._send_user_output('info', threadSwitchMessage) params = { "callFrames": self._debugger_store.thread_manager.get_thread_stack(thread), "reason": serialize.StopReason_to_string(thread.GetStopReason()), "threadSwitchMessage": threadSwitchMessage, "data": {}, } else: params = { "callFrames": self._debugger_store.thread_manager.get_thread_stack(thread), "reason": serialize.StopReason_to_string(thread.GetStopReason()), "data": {}, } self._send_notification('Debugger.paused', params)
def _send_paused_notification(self, process): self._update_stop_thread(process) self._debugger_store.thread_manager.update_thread_switch_message(process) thread = process.GetSelectedThread() output = 'Debugger paused at thread(%d) because of: %s' % ( thread.GetThreadID(), self._debugger_store.thread_manager.get_thread_stop_description(thread)) self._send_user_output('log', output) break_num = thread.GetStopReasonDataAtIndex(0) selected_target = self._debugger_store.debugger.GetSelectedTarget() breakpoint = selected_target.FindBreakpointByID(break_num) params = { 'breakpointId': str(break_num), 'hitCount': str(breakpoint.GetHitCount()), } self._send_notification('Debugger.breakpointHitCountChanged', params) threadSwitchMessage = self._debugger_store.thread_manager.get_thread_switch_message() if threadSwitchMessage: self._send_user_output('info', threadSwitchMessage) params = { "callFrames": self._debugger_store.thread_manager.get_thread_stack(thread), "reason": serialize.StopReason_to_string(thread.GetStopReason()), "threadSwitchMessage": threadSwitchMessage, "data": {}, } else: params = { "callFrames": self._debugger_store.thread_manager.get_thread_stack(thread), "reason": serialize.StopReason_to_string(thread.GetStopReason()), "data": {}, } self._send_notification('Debugger.paused', params) self._debugger_store.thread_manager.send_threads_updated(process)
def _send_paused_notification(self, process): self._debugger_store.thread_manager.update(process) self._update_stop_thread(process) thread = process.GetSelectedThread() log_debug('thread.GetStopReason(): %s' % serialize.StopReason_to_string(thread.GetStopReason())) params = { "callFrames": self._debugger_store.thread_manager.get_thread_stack(thread), "reason": serialize.StopReason_to_string(thread.GetStopReason()), "data": {}, } self._send_notification('Debugger.paused', params)
def _send_paused_notification(self, process): self._debugger_store.thread_manager.update(process) self._update_stop_thread(process) thread = process.GetSelectedThread() output = 'Debugger paused at thread(%d) because of: %s' % ( thread.GetThreadID(), thread.GetStopDescription(MAX_STOP_REASON_DESCRIPTION_LENGTH)) self._send_user_output('log', output) params = { "callFrames": self._debugger_store.thread_manager.get_thread_stack(thread), "reason": serialize.StopReason_to_string(thread.GetStopReason()), "data": {}, } self._send_notification('Debugger.paused', params)
def _broadcast_process_state(self, process): # Reset the object group so old frame variable objects don't linger # forever. self.thread_manager.release() if process.state == eStateStepping or process.state == eStateRunning: self.server.send_notification('Debugger.resumed', None) else: thread = process.GetSelectedThread() self.thread_manager.update(process) params = { "callFrames": self.thread_manager.get_thread_stack(thread), "reason": serialize.StopReason_to_string(thread.GetStopReason()), "data": {}, } self.server.send_notification('Debugger.paused', params)
def _broadcast_process_state(self, process): # Reset the object group so old frame variable objects don't linger # forever. self.remote_object_manager.release_object_group( CALL_STACK_OBJECT_GROUP) if process.state == eStateStepping or process.state == eStateRunning: self.server.send_notification('Debugger.resumed', None) else: thread = process.selected_thread params = { "callFrames": self._get_callstack(thread.frames), "reason": serialize.StopReason_to_string(thread.GetStopReason()), "data": {}, } self.server.send_notification('Debugger.paused', params)