[Lldb-commits] [lldb] r154614 - /lldb/trunk/source/API/SBFrame.cpp

Greg Clayton gclayton at apple.com
Thu Apr 12 13:58:26 PDT 2012


Author: gclayton
Date: Thu Apr 12 15:58:26 2012
New Revision: 154614

URL: http://llvm.org/viewvc/llvm-project?rev=154614&view=rev
Log:
Fixed an issue that happens in LLDB versions after SBFrame switched to using a lldb::ExecutionContextRefSP where we might segfault due to using a shared pointer with NULL in it. The SBFrame object should always have a valid lldb::ExecutionContextRefSP in it. The SBFrame::Clear() method was doing the wrong thing and is now fixed.


Modified:
    lldb/trunk/source/API/SBFrame.cpp

Modified: lldb/trunk/source/API/SBFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBFrame.cpp?rev=154614&r1=154613&r2=154614&view=diff
==============================================================================
--- lldb/trunk/source/API/SBFrame.cpp (original)
+++ lldb/trunk/source/API/SBFrame.cpp Thu Apr 12 15:58:26 2012
@@ -86,7 +86,9 @@
 StackFrameSP
 SBFrame::GetFrameSP() const
 {
-    return m_opaque_sp->GetFrameSP();
+    if (m_opaque_sp)
+        return m_opaque_sp->GetFrameSP();
+    return StackFrameSP();
 }
 
 void
@@ -497,7 +499,7 @@
 void
 SBFrame::Clear()
 {
-    m_opaque_sp.reset();
+    m_opaque_sp->Clear();
 }
 
 lldb::SBValue





More information about the lldb-commits mailing list