diff options
author | Greg Clayton <gclayton@apple.com> | 2013-03-27 23:08:40 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2013-03-27 23:08:40 +0000 |
commit | 5160ce5c72e5f55c2e83ca9914cd0f02e0c5ceb3 (patch) | |
tree | b24bb5959b40d8f0e99ed6d8b13271270dbf08e3 /lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp | |
parent | ccc266559f5c028442b6393362da14d866d9b32b (diff) | |
download | bcm5719-llvm-5160ce5c72e5f55c2e83ca9914cd0f02e0c5ceb3.tar.gz bcm5719-llvm-5160ce5c72e5f55c2e83ca9914cd0f02e0c5ceb3.zip |
<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
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp')
-rw-r--r-- | lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp index 069d23e72c9..36bd9292ba9 100644 --- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp +++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp @@ -1231,7 +1231,7 @@ ObjectFileMachO::ParseSymtab (bool minimize) lldb::offset_t offset = MachHeaderSizeFromMagic(m_header.magic); uint32_t i; - LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_SYMBOLS)); + Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_SYMBOLS)); for (i=0; i<m_header.ncmds; ++i) { @@ -1252,28 +1252,28 @@ ObjectFileMachO::ParseSymtab (bool minimize) if (symtab_load_command.symoff == 0) { if (log) - module_sp->LogMessage(log.get(), "LC_SYMTAB.symoff == 0"); + module_sp->LogMessage(log, "LC_SYMTAB.symoff == 0"); return 0; } if (symtab_load_command.stroff == 0) { if (log) - module_sp->LogMessage(log.get(), "LC_SYMTAB.stroff == 0"); + module_sp->LogMessage(log, "LC_SYMTAB.stroff == 0"); return 0; } if (symtab_load_command.nsyms == 0) { if (log) - module_sp->LogMessage(log.get(), "LC_SYMTAB.nsyms == 0"); + module_sp->LogMessage(log, "LC_SYMTAB.nsyms == 0"); return 0; } if (symtab_load_command.strsize == 0) { if (log) - module_sp->LogMessage(log.get(), "LC_SYMTAB.strsize == 0"); + module_sp->LogMessage(log, "LC_SYMTAB.strsize == 0"); return 0; } break; @@ -1411,7 +1411,7 @@ ObjectFileMachO::ParseSymtab (bool minimize) if (nlist_data.GetByteSize() == 0) { if (log) - module_sp->LogMessage(log.get(), "failed to read nlist data"); + module_sp->LogMessage(log, "failed to read nlist data"); return 0; } @@ -1424,14 +1424,14 @@ ObjectFileMachO::ParseSymtab (bool minimize) if (strtab_addr == LLDB_INVALID_ADDRESS) { if (log) - module_sp->LogMessage(log.get(), "failed to locate the strtab in memory"); + module_sp->LogMessage(log, "failed to locate the strtab in memory"); return 0; } } else { if (log) - module_sp->LogMessage(log.get(), "failed to read strtab data"); + module_sp->LogMessage(log, "failed to read strtab data"); return 0; } } |