[Lldb-commits] [lldb] r109882 - in /lldb/trunk: include/lldb/API/SBDebugger.h include/lldb/API/SBTarget.h include/lldb/API/SBThread.h source/API/SBDebugger.cpp source/API/SBTarget.cpp source/API/SBThread.cpp

Greg Clayton gclayton at apple.com
Fri Jul 30 13:12:55 PDT 2010


Author: gclayton
Date: Fri Jul 30 15:12:55 2010
New Revision: 109882

URL: http://llvm.org/viewvc/llvm-project?rev=109882&view=rev
Log:
Added "void Clear();" methods to SBDebugger, SBTarget and SBThread so they can release their shared pointers.

Modified:
    lldb/trunk/include/lldb/API/SBDebugger.h
    lldb/trunk/include/lldb/API/SBTarget.h
    lldb/trunk/include/lldb/API/SBThread.h
    lldb/trunk/source/API/SBDebugger.cpp
    lldb/trunk/source/API/SBTarget.cpp
    lldb/trunk/source/API/SBThread.cpp

Modified: lldb/trunk/include/lldb/API/SBDebugger.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBDebugger.h?rev=109882&r1=109881&r2=109882&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBDebugger.h (original)
+++ lldb/trunk/include/lldb/API/SBDebugger.h Fri Jul 30 15:12:55 2010
@@ -34,6 +34,9 @@
     IsValid() const;
 
     void
+    Clear ();
+
+    void
     SetAsync (bool b);
 
     void

Modified: lldb/trunk/include/lldb/API/SBTarget.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBTarget.h?rev=109882&r1=109881&r2=109882&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBTarget.h (original)
+++ lldb/trunk/include/lldb/API/SBTarget.h Fri Jul 30 15:12:55 2010
@@ -76,6 +76,9 @@
     lldb::SBModule
     FindModule (const lldb::SBFileSpec &file_spec);
 
+    void
+    Clear ();
+
     bool
     DeleteTargetFromList (lldb_private::TargetList *list);
 

Modified: lldb/trunk/include/lldb/API/SBThread.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBThread.h?rev=109882&r1=109881&r2=109882&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBThread.h (original)
+++ lldb/trunk/include/lldb/API/SBThread.h Fri Jul 30 15:12:55 2010
@@ -30,6 +30,9 @@
     bool
     IsValid() const;
 
+    void
+    Clear ();
+
     lldb::StopReason
     GetStopReason();
 

Modified: lldb/trunk/source/API/SBDebugger.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBDebugger.cpp?rev=109882&r1=109881&r2=109882&view=diff
==============================================================================
--- lldb/trunk/source/API/SBDebugger.cpp (original)
+++ lldb/trunk/source/API/SBDebugger.cpp Fri Jul 30 15:12:55 2010
@@ -43,6 +43,12 @@
     Debugger::Terminate();
 }
 
+void
+SBDebugger::Clear ()
+{
+    m_opaque_sp.reset();
+}
+
 SBDebugger
 SBDebugger::Create()
 {

Modified: lldb/trunk/source/API/SBTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTarget.cpp?rev=109882&r1=109881&r2=109882&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTarget.cpp (original)
+++ lldb/trunk/source/API/SBTarget.cpp Fri Jul 30 15:12:55 2010
@@ -353,6 +353,13 @@
     return 0;
 }
 
+void
+SBTarget::Clear ()
+{
+    m_opaque_sp.reset();
+}
+
+
 SBModule
 SBTarget::FindModule (const SBFileSpec &sb_file_spec)
 {

Modified: lldb/trunk/source/API/SBThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBThread.cpp?rev=109882&r1=109881&r2=109882&view=diff
==============================================================================
--- lldb/trunk/source/API/SBThread.cpp (original)
+++ lldb/trunk/source/API/SBThread.cpp Fri Jul 30 15:12:55 2010
@@ -67,6 +67,13 @@
     return m_opaque_sp != NULL;
 }
 
+void
+SBThread::Clear ()
+{
+    m_opaque_sp.reset();
+}
+
+
 StopReason
 SBThread::GetStopReason()
 {





More information about the lldb-commits mailing list