<rdar://problem/13521159>

LLDB is crashing when logging is enabled from lldb-perf-clang. This has to do with the global destructor chain as the process and its threads are being torn down.

All logging channels now make one and only one instance that is kept in a global pointer which is never freed. This guarantees that logging can correctly continue as the process tears itself down.

llvm-svn: 178191
This commit is contained in:
Greg Clayton
2013-03-27 23:08:40 +00:00
parent ccc266559f
commit 5160ce5c72
155 changed files with 1008 additions and 1001 deletions

View File

@@ -71,7 +71,7 @@ SBCompileUnit::GetNumLineEntries () const
SBLineEntry
SBCompileUnit::GetLineEntryAtIndex (uint32_t idx) const
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBLineEntry sb_line_entry;
if (m_opaque_ptr)
@@ -106,7 +106,7 @@ SBCompileUnit::FindLineEntryIndex (uint32_t start_idx, uint32_t line, SBFileSpec
uint32_t
SBCompileUnit::FindLineEntryIndex (uint32_t start_idx, uint32_t line, SBFileSpec *inline_file_spec, bool exact) const
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
uint32_t index = UINT32_MAX;
if (m_opaque_ptr)
@@ -157,7 +157,7 @@ SBCompileUnit::GetNumSupportFiles () const
SBFileSpec
SBCompileUnit::GetSupportFileAtIndex (uint32_t idx) const
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBFileSpec sb_file_spec;
if (m_opaque_ptr)