Handle team deletion debug event.
When the target team exits, notify the user and shut down the debugger.
This commit is contained in:
parent
8b49cb7645
commit
dd817ff93c
@ -1145,10 +1145,14 @@ TeamDebugger::_HandleDebuggerMessage(DebugEvent* event)
|
|||||||
//printf("B_DEBUGGER_MESSAGE_TEAM_CREATED: team: %ld\n", message.team_created.new_team);
|
//printf("B_DEBUGGER_MESSAGE_TEAM_CREATED: team: %ld\n", message.team_created.new_team);
|
||||||
// break;
|
// break;
|
||||||
case B_DEBUGGER_MESSAGE_TEAM_DELETED:
|
case B_DEBUGGER_MESSAGE_TEAM_DELETED:
|
||||||
// TODO: Handle!
|
{
|
||||||
TRACE_EVENTS("B_DEBUGGER_MESSAGE_TEAM_DELETED: team: %" B_PRId32
|
TRACE_EVENTS("B_DEBUGGER_MESSAGE_TEAM_DELETED: team: %" B_PRId32
|
||||||
"\n", event->Team());
|
"\n", event->Team());
|
||||||
|
TeamDeletedEvent* teamEvent
|
||||||
|
= dynamic_cast<TeamDeletedEvent*>(event);
|
||||||
|
handled = _HandleTeamDeleted(teamEvent);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case B_DEBUGGER_MESSAGE_TEAM_EXEC:
|
case B_DEBUGGER_MESSAGE_TEAM_EXEC:
|
||||||
TRACE_EVENTS("B_DEBUGGER_MESSAGE_TEAM_EXEC: team: %" B_PRId32 "\n",
|
TRACE_EVENTS("B_DEBUGGER_MESSAGE_TEAM_EXEC: team: %" B_PRId32 "\n",
|
||||||
event->Team());
|
event->Team());
|
||||||
@ -1226,6 +1230,20 @@ TeamDebugger::_HandleDebuggerMessage(DebugEvent* event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
TeamDebugger::_HandleTeamDeleted(TeamDeletedEvent* event)
|
||||||
|
{
|
||||||
|
char message[64];
|
||||||
|
snprintf(message, sizeof(message), "Team %" B_PRId32 " has terminated.",
|
||||||
|
event->Team());
|
||||||
|
fUserInterface->SynchronouslyAskUser("Quit Debugger", message, "Quit",
|
||||||
|
NULL, NULL);
|
||||||
|
PostMessage(B_QUIT_REQUESTED);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
TeamDebugger::_HandleThreadCreated(ThreadCreatedEvent* event)
|
TeamDebugger::_HandleThreadCreated(ThreadCreatedEvent* event)
|
||||||
{
|
{
|
||||||
|
@ -116,6 +116,8 @@ private:
|
|||||||
|
|
||||||
void _HandleDebuggerMessage(DebugEvent* event);
|
void _HandleDebuggerMessage(DebugEvent* event);
|
||||||
|
|
||||||
|
bool _HandleTeamDeleted(
|
||||||
|
TeamDeletedEvent* event);
|
||||||
bool _HandleThreadCreated(
|
bool _HandleThreadCreated(
|
||||||
ThreadCreatedEvent* event);
|
ThreadCreatedEvent* event);
|
||||||
bool _HandleThreadRenamed(
|
bool _HandleThreadRenamed(
|
||||||
|
Loading…
Reference in New Issue
Block a user