We were leaking a stack frame in StackFrameList in Thread.cpp which could

cause extra shared pointer references to one or more modules to be leaked.
This would cause many object files to stay around the life of LLDB, so after
a recompile and rexecution, we would keep adding more and more memory. After
fixing the leak, we found many cases where leaked stack frames were still
being used and causing crashes in the test suite. These are now all resolved.

llvm-svn: 137516
This commit is contained in:
Greg Clayton
2011-08-12 21:40:01 +00:00
parent 2fcc1cfdce
commit 7e9b1fd045
31 changed files with 620 additions and 124 deletions

View File

@@ -228,4 +228,62 @@ SBAddress::GetModule ()
return sb_module;
}
SBSymbolContext
SBAddress::GetSymbolContext (uint32_t resolve_scope)
{
SBSymbolContext sb_sc;
if (m_opaque_ap.get())
m_opaque_ap->CalculateSymbolContext (&sb_sc.ref(), resolve_scope);
return sb_sc;
}
SBCompileUnit
SBAddress::GetCompileUnit ()
{
SBCompileUnit sb_comp_unit;
if (m_opaque_ap.get())
sb_comp_unit.reset(m_opaque_ap->CalculateSymbolContextCompileUnit());
return sb_comp_unit;
}
SBFunction
SBAddress::GetFunction ()
{
SBFunction sb_function;
if (m_opaque_ap.get())
sb_function.reset(m_opaque_ap->CalculateSymbolContextFunction());
return sb_function;
}
SBBlock
SBAddress::GetBlock ()
{
SBBlock sb_block;
if (m_opaque_ap.get())
sb_block.reset(m_opaque_ap->CalculateSymbolContextBlock());
return sb_block;
}
SBSymbol
SBAddress::GetSymbol ()
{
SBSymbol sb_symbol;
if (m_opaque_ap.get())
sb_symbol.reset(m_opaque_ap->CalculateSymbolContextSymbol());
return sb_symbol;
}
SBLineEntry
SBAddress::GetLineEntry ()
{
SBLineEntry sb_line_entry;
if (m_opaque_ap.get())
{
LineEntry line_entry;
if (m_opaque_ap->CalculateSymbolContextLineEntry (line_entry))
sb_line_entry.SetLineEntry (line_entry);
}
return sb_line_entry;
}