mirror of
https://github.com/intel/llvm.git
synced 2026-01-15 12:25:46 +08:00
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.
llvm-svn: 154614
This commit is contained in:
@@ -86,7 +86,9 @@ SBFrame::~SBFrame()
|
||||
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 @@ SBFrame::GetPCAddress () const
|
||||
void
|
||||
SBFrame::Clear()
|
||||
{
|
||||
m_opaque_sp.reset();
|
||||
m_opaque_sp->Clear();
|
||||
}
|
||||
|
||||
lldb::SBValue
|
||||
|
||||
Reference in New Issue
Block a user