[Haiku-commits] r31204 - haiku/trunk/src/apps/debugger

stippi at mail.berlios.de stippi at mail.berlios.de
Tue Jun 23 15:09:52 CEST 2009


Author: stippi
Date: 2009-06-23 15:09:50 +0200 (Tue, 23 Jun 2009)
New Revision: 31204
ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31204&view=rev

Modified:
   haiku/trunk/src/apps/debugger/TeamDebugger.cpp
   haiku/trunk/src/apps/debugger/TeamDebugger.h
Log:
Implement killing the debugged team on quitting a TeamDebugger, the obviuos
way... thanks Ingo! Seems to work just fine.


Modified: haiku/trunk/src/apps/debugger/TeamDebugger.cpp
===================================================================
--- haiku/trunk/src/apps/debugger/TeamDebugger.cpp	2009-06-23 13:08:57 UTC (rev 31203)
+++ haiku/trunk/src/apps/debugger/TeamDebugger.cpp	2009-06-23 13:09:50 UTC (rev 31204)
@@ -36,7 +36,8 @@
 	fWorker(NULL),
 	fDebugEventListener(-1),
 	fTeamWindow(NULL),
-	fTerminating(false)
+	fTerminating(false),
+	fKillTeamOnQuit(false)
 {
 }
 
@@ -55,6 +56,9 @@
 	if (fDebugEventListener >= 0)
 		wait_for_thread(fDebugEventListener, NULL);
 
+	if (fKillTeamOnQuit && fTeam != NULL)
+		kill_team(fTeam->ID());
+
 	delete fDebuggerInterface;
 	delete fWorker;
 	delete fDebugModel;
@@ -345,11 +349,7 @@
 
 	switch (alert->Go()) {
 		case 0:
-			// TODO: Implement killing the team.
-			alert = new BAlert("TODO", "That is not nice and I won't do it "
-				"either! Test failed. Nice to know how you think about these "
-				"matters.", "Ugh!");
-			alert->Go();
+			fKillTeamOnQuit = true;
 			break;
 		case 1:
 			return false;

Modified: haiku/trunk/src/apps/debugger/TeamDebugger.h
===================================================================
--- haiku/trunk/src/apps/debugger/TeamDebugger.h	2009-06-23 13:08:57 UTC (rev 31203)
+++ haiku/trunk/src/apps/debugger/TeamDebugger.h	2009-06-23 13:09:50 UTC (rev 31204)
@@ -124,6 +124,7 @@
 			thread_id			fDebugEventListener;
 			TeamWindow*			fTeamWindow;
 	volatile bool				fTerminating;
+			bool				fKillTeamOnQuit;
 };
 
 #endif	// TEAM_DEBUGGER_H




More information about the Haiku-commits mailing list