Debugger: Start watching signal events.

TeamDebugger:
- Add signal events to debug event mask. Upon receipt of such an event,
  stop the target thread. WIP.
This commit is contained in:
Rene Gollent
2015-07-02 22:38:07 -04:00
parent 601a9f1d23
commit 24fe478ef8
3 changed files with 69 additions and 3 deletions
+12 -2
View File
@@ -454,7 +454,7 @@ TeamDebugger::Init(team_id teamID, thread_id threadID, int argc,
// set team debugging flags
fDebuggerInterface->SetTeamDebuggingFlags(
B_TEAM_DEBUG_THREADS | B_TEAM_DEBUG_IMAGES
| B_TEAM_DEBUG_POST_SYSCALL);
| B_TEAM_DEBUG_POST_SYSCALL | B_TEAM_DEBUG_SIGNALS);
// get the initial state of the team
AutoLocker< ::Team> teamLocker(fTeam);
@@ -1617,8 +1617,18 @@ TeamDebugger::_HandleDebuggerMessage(DebugEvent* event)
}
break;
}
case B_DEBUGGER_MESSAGE_PRE_SYSCALL:
case B_DEBUGGER_MESSAGE_SIGNAL_RECEIVED:
{
TRACE_EVENTS("B_DEBUGGER_MESSAGE_SIGNAL_RECEIVED: thread: %"
B_PRId32 "\n", event->Thread());
if (handler != NULL) {
handled = handler->HandleSignalReceived(
dynamic_cast<SignalReceivedEvent*>(event));
}
break;
}
case B_DEBUGGER_MESSAGE_PRE_SYSCALL:
case B_DEBUGGER_MESSAGE_PROFILER_UPDATE:
case B_DEBUGGER_MESSAGE_HANDED_OVER:
// not interested