diff --git a/src/apps/debugger/controllers/TeamDebugger.cpp b/src/apps/debugger/controllers/TeamDebugger.cpp index 433e8ef61c..25d66d5eb6 100644 --- a/src/apps/debugger/controllers/TeamDebugger.cpp +++ b/src/apps/debugger/controllers/TeamDebugger.cpp @@ -1145,10 +1145,14 @@ TeamDebugger::_HandleDebuggerMessage(DebugEvent* event) //printf("B_DEBUGGER_MESSAGE_TEAM_CREATED: team: %ld\n", message.team_created.new_team); // break; case B_DEBUGGER_MESSAGE_TEAM_DELETED: - // TODO: Handle! + { TRACE_EVENTS("B_DEBUGGER_MESSAGE_TEAM_DELETED: team: %" B_PRId32 "\n", event->Team()); + TeamDeletedEvent* teamEvent + = dynamic_cast(event); + handled = _HandleTeamDeleted(teamEvent); break; + } case B_DEBUGGER_MESSAGE_TEAM_EXEC: TRACE_EVENTS("B_DEBUGGER_MESSAGE_TEAM_EXEC: team: %" B_PRId32 "\n", 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 TeamDebugger::_HandleThreadCreated(ThreadCreatedEvent* event) { diff --git a/src/apps/debugger/controllers/TeamDebugger.h b/src/apps/debugger/controllers/TeamDebugger.h index b8b43478af..700c01a430 100644 --- a/src/apps/debugger/controllers/TeamDebugger.h +++ b/src/apps/debugger/controllers/TeamDebugger.h @@ -116,6 +116,8 @@ private: void _HandleDebuggerMessage(DebugEvent* event); + bool _HandleTeamDeleted( + TeamDeletedEvent* event); bool _HandleThreadCreated( ThreadCreatedEvent* event); bool _HandleThreadRenamed(