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/API/SBData.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/API/SBData.cpp')
-rw-r--r-- | lldb/source/API/SBData.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/lldb/source/API/SBData.cpp b/lldb/source/API/SBData.cpp index 2a6c59d8384..5b2f075158b 100644 --- a/lldb/source/API/SBData.cpp +++ b/lldb/source/API/SBData.cpp @@ -86,7 +86,7 @@ SBData::IsValid() uint8_t SBData::GetAddressByteSize () { - LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); + Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); uint8_t value = 0; if (m_opaque_sp.get()) value = m_opaque_sp->GetAddressByteSize(); @@ -99,7 +99,7 @@ SBData::GetAddressByteSize () void SBData::SetAddressByteSize (uint8_t addr_byte_size) { - LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); + Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); if (m_opaque_sp.get()) m_opaque_sp->SetAddressByteSize(addr_byte_size); if (log) @@ -116,7 +116,7 @@ SBData::Clear () size_t SBData::GetByteSize () { - LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); + Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); size_t value = 0; if (m_opaque_sp.get()) value = m_opaque_sp->GetByteSize(); @@ -129,7 +129,7 @@ SBData::GetByteSize () lldb::ByteOrder SBData::GetByteOrder () { - LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); + Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); lldb::ByteOrder value = eByteOrderInvalid; if (m_opaque_sp.get()) value = m_opaque_sp->GetByteOrder(); @@ -142,7 +142,7 @@ SBData::GetByteOrder () void SBData::SetByteOrder (lldb::ByteOrder endian) { - LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); + Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); if (m_opaque_sp.get()) m_opaque_sp->SetByteOrder(endian); if (log) @@ -153,7 +153,7 @@ SBData::SetByteOrder (lldb::ByteOrder endian) float SBData::GetFloat (lldb::SBError& error, lldb::offset_t offset) { - LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); + Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); float value = 0; if (!m_opaque_sp.get()) { @@ -175,7 +175,7 @@ SBData::GetFloat (lldb::SBError& error, lldb::offset_t offset) double SBData::GetDouble (lldb::SBError& error, lldb::offset_t offset) { - LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); + Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); double value = 0; if (!m_opaque_sp.get()) { @@ -197,7 +197,7 @@ SBData::GetDouble (lldb::SBError& error, lldb::offset_t offset) long double SBData::GetLongDouble (lldb::SBError& error, lldb::offset_t offset) { - LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); + Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); long double value = 0; if (!m_opaque_sp.get()) { @@ -219,7 +219,7 @@ SBData::GetLongDouble (lldb::SBError& error, lldb::offset_t offset) lldb::addr_t SBData::GetAddress (lldb::SBError& error, lldb::offset_t offset) { - LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); + Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); lldb::addr_t value = 0; if (!m_opaque_sp.get()) { @@ -241,7 +241,7 @@ SBData::GetAddress (lldb::SBError& error, lldb::offset_t offset) uint8_t SBData::GetUnsignedInt8 (lldb::SBError& error, lldb::offset_t offset) { - LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); + Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); uint8_t value = 0; if (!m_opaque_sp.get()) { @@ -263,7 +263,7 @@ SBData::GetUnsignedInt8 (lldb::SBError& error, lldb::offset_t offset) uint16_t SBData::GetUnsignedInt16 (lldb::SBError& error, lldb::offset_t offset) { - LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); + Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); uint16_t value = 0; if (!m_opaque_sp.get()) { @@ -285,7 +285,7 @@ SBData::GetUnsignedInt16 (lldb::SBError& error, lldb::offset_t offset) uint32_t SBData::GetUnsignedInt32 (lldb::SBError& error, lldb::offset_t offset) { - LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); + Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); uint32_t value = 0; if (!m_opaque_sp.get()) { @@ -307,7 +307,7 @@ SBData::GetUnsignedInt32 (lldb::SBError& error, lldb::offset_t offset) uint64_t SBData::GetUnsignedInt64 (lldb::SBError& error, lldb::offset_t offset) { - LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); + Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); uint64_t value = 0; if (!m_opaque_sp.get()) { @@ -329,7 +329,7 @@ SBData::GetUnsignedInt64 (lldb::SBError& error, lldb::offset_t offset) int8_t SBData::GetSignedInt8 (lldb::SBError& error, lldb::offset_t offset) { - LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); + Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); int8_t value = 0; if (!m_opaque_sp.get()) { @@ -351,7 +351,7 @@ SBData::GetSignedInt8 (lldb::SBError& error, lldb::offset_t offset) int16_t SBData::GetSignedInt16 (lldb::SBError& error, lldb::offset_t offset) { - LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); + Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); int16_t value = 0; if (!m_opaque_sp.get()) { @@ -373,7 +373,7 @@ SBData::GetSignedInt16 (lldb::SBError& error, lldb::offset_t offset) int32_t SBData::GetSignedInt32 (lldb::SBError& error, lldb::offset_t offset) { - LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); + Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); int32_t value = 0; if (!m_opaque_sp.get()) { @@ -395,7 +395,7 @@ SBData::GetSignedInt32 (lldb::SBError& error, lldb::offset_t offset) int64_t SBData::GetSignedInt64 (lldb::SBError& error, lldb::offset_t offset) { - LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); + Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); int64_t value = 0; if (!m_opaque_sp.get()) { @@ -417,7 +417,7 @@ SBData::GetSignedInt64 (lldb::SBError& error, lldb::offset_t offset) const char* SBData::GetString (lldb::SBError& error, lldb::offset_t offset) { - LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); + Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); const char* value = 0; if (!m_opaque_sp.get()) { @@ -465,7 +465,7 @@ SBData::ReadRawData (lldb::SBError& error, void *buf, size_t size) { - LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); + Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); void* ok = NULL; if (!m_opaque_sp.get()) { @@ -491,7 +491,7 @@ SBData::SetData (lldb::SBError& error, lldb::ByteOrder endian, uint8_t addr_size) { - LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); + Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); if (!m_opaque_sp.get()) m_opaque_sp.reset(new DataExtractor(buf, size, endian, addr_size)); else @@ -504,7 +504,7 @@ SBData::SetData (lldb::SBError& error, bool SBData::Append (const SBData& rhs) { - LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); + Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); bool value = false; if (m_opaque_sp.get() && rhs.m_opaque_sp.get()) value = m_opaque_sp.get()->Append(*rhs.m_opaque_sp); @@ -613,7 +613,7 @@ SBData::CreateDataFromDoubleArray (lldb::ByteOrder endian, uint32_t addr_byte_si bool SBData::SetDataFromCString (const char* data) { - LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); + Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); if (!data) { @@ -642,7 +642,7 @@ SBData::SetDataFromCString (const char* data) bool SBData::SetDataFromUInt64Array (uint64_t* array, size_t array_len) { - LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); + Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); if (!array || array_len == 0) { @@ -671,7 +671,7 @@ SBData::SetDataFromUInt64Array (uint64_t* array, size_t array_len) bool SBData::SetDataFromUInt32Array (uint32_t* array, size_t array_len) { - LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); + Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); if (!array || array_len == 0) { @@ -700,7 +700,7 @@ SBData::SetDataFromUInt32Array (uint32_t* array, size_t array_len) bool SBData::SetDataFromSInt64Array (int64_t* array, size_t array_len) { - LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); + Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); if (!array || array_len == 0) { @@ -729,7 +729,7 @@ SBData::SetDataFromSInt64Array (int64_t* array, size_t array_len) bool SBData::SetDataFromSInt32Array (int32_t* array, size_t array_len) { - LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); + Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); if (!array || array_len == 0) { @@ -758,7 +758,7 @@ SBData::SetDataFromSInt32Array (int32_t* array, size_t array_len) bool SBData::SetDataFromDoubleArray (double* array, size_t array_len) { - LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); + Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); if (!array || array_len == 0) { |