[haiku-commits] r42362 - in haiku/trunk/src/apps/debugger: . debug_info

  • From: anevilyak@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 2 Jul 2011 04:01:02 +0200 (CEST)

Author: anevilyak
Date: 2011-07-02 04:01:02 +0200 (Sat, 02 Jul 2011)
New Revision: 42362
Changeset: https://dev.haiku-os.org/changeset/42362

Modified:
   haiku/trunk/src/apps/debugger/BreakpointManager.cpp
   haiku/trunk/src/apps/debugger/TeamDebugger.cpp
   haiku/trunk/src/apps/debugger/ThreadHandler.cpp
   haiku/trunk/src/apps/debugger/debug_info/DebuggerImageDebugInfo.cpp
   haiku/trunk/src/apps/debugger/debug_info/TeamDebugInfo.cpp
Log:
Now that DebuggerInterface is BReferenceable, all of these need to be correctly
acquiring/releasing refs to it as well. Thanks Ingo.



Modified: haiku/trunk/src/apps/debugger/BreakpointManager.cpp
===================================================================
--- haiku/trunk/src/apps/debugger/BreakpointManager.cpp 2011-07-01 21:45:44 UTC 
(rev 42361)
+++ haiku/trunk/src/apps/debugger/BreakpointManager.cpp 2011-07-02 02:01:02 UTC 
(rev 42362)
@@ -26,11 +26,13 @@
        fTeam(team),
        fDebuggerInterface(debuggerInterface)
 {
+       fDebuggerInterface->AcquireReference();
 }
 
 
 BreakpointManager::~BreakpointManager()
 {
+       fDebuggerInterface->ReleaseReference();
 }
 
 

Modified: haiku/trunk/src/apps/debugger/TeamDebugger.cpp
===================================================================
--- haiku/trunk/src/apps/debugger/TeamDebugger.cpp      2011-07-01 21:45:44 UTC 
(rev 42361)
+++ haiku/trunk/src/apps/debugger/TeamDebugger.cpp      2011-07-02 02:01:02 UTC 
(rev 42362)
@@ -160,8 +160,10 @@
 
        fTerminating = true;
 
-       if (fDebuggerInterface != NULL)
+       if (fDebuggerInterface != NULL) {
                fDebuggerInterface->Close(fKillTeamOnQuit);
+               fDebuggerInterface->ReleaseReference();
+       }
 
        if (fWorker != NULL)
                fWorker->ShutDown();
@@ -193,7 +195,6 @@
 
        delete fBreakpointManager;
        delete fMemoryBlockManager;
-       delete fDebuggerInterface;
        delete fWorker;
        delete fTeam;
        delete fFileManager;

Modified: haiku/trunk/src/apps/debugger/ThreadHandler.cpp
===================================================================
--- haiku/trunk/src/apps/debugger/ThreadHandler.cpp     2011-07-01 21:45:44 UTC 
(rev 42361)
+++ haiku/trunk/src/apps/debugger/ThreadHandler.cpp     2011-07-02 02:01:02 UTC 
(rev 42362)
@@ -54,12 +54,14 @@
        fPreviousInstructionPointer(0),
        fSingleStepping(false)
 {
+       fDebuggerInterface->AcquireReference();
 }
 
 
 ThreadHandler::~ThreadHandler()
 {
        _ClearContinuationState();
+       fDebuggerInterface->ReleaseReference();
 }
 
 

Modified: haiku/trunk/src/apps/debugger/debug_info/DebuggerImageDebugInfo.cpp
===================================================================
--- haiku/trunk/src/apps/debugger/debug_info/DebuggerImageDebugInfo.cpp 
2011-07-01 21:45:44 UTC (rev 42361)
+++ haiku/trunk/src/apps/debugger/debug_info/DebuggerImageDebugInfo.cpp 
2011-07-02 02:01:02 UTC (rev 42362)
@@ -24,11 +24,13 @@
        fDebuggerInterface(debuggerInterface),
        fArchitecture(architecture)
 {
+       fDebuggerInterface->AcquireReference();
 }
 
 
 DebuggerImageDebugInfo::~DebuggerImageDebugInfo()
 {
+       fDebuggerInterface->ReleaseReference();
 }
 
 

Modified: haiku/trunk/src/apps/debugger/debug_info/TeamDebugInfo.cpp
===================================================================
--- haiku/trunk/src/apps/debugger/debug_info/TeamDebugInfo.cpp  2011-07-01 
21:45:44 UTC (rev 42361)
+++ haiku/trunk/src/apps/debugger/debug_info/TeamDebugInfo.cpp  2011-07-02 
02:01:02 UTC (rev 42362)
@@ -262,6 +262,7 @@
        fSourceFiles(NULL),
        fTypeCache(NULL)
 {
+       fDebuggerInterface->AcquireReference();
 }
 
 
@@ -291,6 +292,8 @@
 
                delete fFunctions;
        }
+
+       fDebuggerInterface->ReleaseReference();
 }
 
 


Other related posts:

  • » [haiku-commits] r42362 - in haiku/trunk/src/apps/debugger: . debug_info - anevilyak