summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2013-03-27 23:08:40 +0000
committerGreg Clayton <gclayton@apple.com>2013-03-27 23:08:40 +0000
commit5160ce5c72e5f55c2e83ca9914cd0f02e0c5ceb3 (patch)
treeb24bb5959b40d8f0e99ed6d8b13271270dbf08e3 /lldb/source/Plugins
parentccc266559f5c028442b6393362da14d866d9b32b (diff)
downloadbcm5719-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')
-rw-r--r--lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp2
-rw-r--r--lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp12
-rw-r--r--lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp19
-rw-r--r--lldb/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp4
-rw-r--r--lldb/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.h2
-rw-r--r--lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp2
-rw-r--r--lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.h2
-rw-r--r--lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp2
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp2
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp10
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp6
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp12
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp2
-rw-r--r--lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp16
-rw-r--r--lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp8
-rw-r--r--lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp8
-rw-r--r--lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp14
-rw-r--r--lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDPLog.cpp46
-rw-r--r--lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDPLog.h4
-rw-r--r--lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp2
-rw-r--r--lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp10
-rw-r--r--lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp2
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp14
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp10
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp2
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp8
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp44
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp50
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.h6
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp2
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp14
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp4
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp2
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp6
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp8
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp59
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h6
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp130
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp4
-rw-r--r--lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp10
40 files changed, 288 insertions, 278 deletions
diff --git a/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp b/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp
index fbb18ddce02..1f07c030def 100644
--- a/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp
+++ b/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp
@@ -315,7 +315,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread,
addr_t *arg5_ptr,
addr_t *arg6_ptr) const
{
- LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
+ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
if (log)
log->Printf("ABISysV_x86_64::PrepareTrivialCall\n(\n thread = %p\n sp = 0x%" PRIx64 "\n func_addr = 0x%" PRIx64 "\n return_addr = 0x%" PRIx64 "\n arg1_ptr = %p (0x%" PRIx64 ")\n arg2_ptr = %p (0x%" PRIx64 ")\n arg3_ptr = %p (0x%" PRIx64 ")\n)",
diff --git a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
index 7735c766537..0552d7fbf31 100644
--- a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
+++ b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
@@ -1082,14 +1082,14 @@ DynamicLoaderDarwinKernel::BreakpointHit (StoppointCallbackContext *context,
user_id_t break_id,
user_id_t break_loc_id)
{
- LogSP log(GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER));
+ Log *log(GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER));
if (log)
log->Printf ("DynamicLoaderDarwinKernel::BreakpointHit (...)\n");
ReadAllKextSummaries ();
if (log)
- PutToLog(log.get());
+ PutToLog(log);
return GetStopWhenImagesChange();
}
@@ -1156,7 +1156,7 @@ bool
DynamicLoaderDarwinKernel::ParseKextSummaries (const Address &kext_summary_addr, uint32_t count)
{
KextImageInfo::collection kext_summaries;
- LogSP log(GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER));
+ Log *log(GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER));
if (log)
log->Printf ("Kexts-changed breakpoint hit, there are %d kexts currently.\n", count);
@@ -1287,7 +1287,7 @@ DynamicLoaderDarwinKernel::ParseKextSummaries (const Address &kext_summary_addr,
s->Printf (".");
if (log)
- kext_summaries[new_kext].PutToLog (log.get());
+ kext_summaries[new_kext].PutToLog (log);
}
}
m_process->GetTarget().ModulesDidLoad (loaded_module_list);
@@ -1381,8 +1381,6 @@ DynamicLoaderDarwinKernel::ReadKextSummaries (const Address &kext_summary_addr,
bool
DynamicLoaderDarwinKernel::ReadAllKextSummaries ()
{
- LogSP log(GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER));
-
Mutex::Locker locker(m_mutex);
if (ReadKextSummaryHeader ())
@@ -1537,7 +1535,7 @@ ThreadPlanSP
DynamicLoaderDarwinKernel::GetStepThroughTrampolinePlan (Thread &thread, bool stop_others)
{
ThreadPlanSP thread_plan_sp;
- LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
+ Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
if (log)
log->Printf ("Could not find symbol for step through.");
return thread_plan_sp;
diff --git a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
index 224ad3f83ab..61b6de2c50d 100644
--- a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
+++ b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
@@ -788,7 +788,7 @@ bool
DynamicLoaderMacOSXDYLD::AddModulesUsingImageInfosAddress (lldb::addr_t image_infos_addr, uint32_t image_infos_count)
{
DYLDImageInfo::collection image_infos;
- LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER));
+ Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER));
if (log)
log->Printf ("Adding %d modules.\n", image_infos_count);
@@ -813,7 +813,7 @@ DynamicLoaderMacOSXDYLD::AddModulesUsingImageInfos (DYLDImageInfo::collection &i
{
// Now add these images to the main list.
ModuleList loaded_module_list;
- LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER));
+ Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER));
Target &target = m_process->GetTarget();
ModuleList& target_images = target.GetImages();
@@ -822,7 +822,7 @@ DynamicLoaderMacOSXDYLD::AddModulesUsingImageInfos (DYLDImageInfo::collection &i
if (log)
{
log->Printf ("Adding new image at address=0x%16.16" PRIx64 ".", image_infos[idx].address);
- image_infos[idx].PutToLog (log.get());
+ image_infos[idx].PutToLog (log);
}
m_dyld_image_infos.push_back(image_infos[idx]);
@@ -917,7 +917,7 @@ bool
DynamicLoaderMacOSXDYLD::RemoveModulesUsingImageInfosAddress (lldb::addr_t image_infos_addr, uint32_t image_infos_count)
{
DYLDImageInfo::collection image_infos;
- LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER));
+ Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER));
Mutex::Locker locker(m_mutex);
if (m_process->GetStopID() == m_dyld_image_infos_stop_id)
@@ -940,7 +940,7 @@ DynamicLoaderMacOSXDYLD::RemoveModulesUsingImageInfosAddress (lldb::addr_t image
if (log)
{
log->Printf ("Removing module at address=0x%16.16" PRIx64 ".", image_infos[idx].address);
- image_infos[idx].PutToLog (log.get());
+ image_infos[idx].PutToLog (log);
}
// Remove this image_infos from the m_all_image_infos. We do the comparision by address
@@ -973,7 +973,7 @@ DynamicLoaderMacOSXDYLD::RemoveModulesUsingImageInfosAddress (lldb::addr_t image
if (log)
{
log->Printf ("Could not find module for unloading info entry:");
- image_infos[idx].PutToLog(log.get());
+ image_infos[idx].PutToLog(log);
}
}
@@ -989,7 +989,7 @@ DynamicLoaderMacOSXDYLD::RemoveModulesUsingImageInfosAddress (lldb::addr_t image
if (log)
{
log->Printf ("Could not find image_info entry for unloading image:");
- image_infos[idx].PutToLog(log.get());
+ image_infos[idx].PutToLog(log);
}
}
}
@@ -1059,7 +1059,7 @@ DynamicLoaderMacOSXDYLD::ReadImageInfos (lldb::addr_t image_infos_addr,
bool
DynamicLoaderMacOSXDYLD::InitializeFromAllImageInfos ()
{
- LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER));
+ Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER));
Mutex::Locker locker(m_mutex);
if (m_process->GetStopID() == m_dyld_image_infos_stop_id
@@ -1304,7 +1304,6 @@ DynamicLoaderMacOSXDYLD::UpdateImageInfosHeaderAndLoadCommands(DYLDImageInfo::co
bool update_executable)
{
uint32_t exe_idx = UINT32_MAX;
- LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER));
// Read any UUID values that we can get
for (uint32_t i = 0; i < infos_count; i++)
{
@@ -1592,7 +1591,7 @@ DynamicLoaderMacOSXDYLD::GetStepThroughTrampolinePlan (Thread &thread, bool stop
StackFrame *current_frame = thread.GetStackFrameAtIndex(0).get();
const SymbolContext &current_context = current_frame->GetSymbolContext(eSymbolContextSymbol);
Symbol *current_symbol = current_context.symbol;
- LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
+ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
if (current_symbol != NULL)
{
diff --git a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp
index de4d1e77b88..05cc7172d70 100644
--- a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp
+++ b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp
@@ -84,7 +84,7 @@ AuxVector::AuxVector(Process *process)
: m_process(process)
{
DataExtractor data;
- LogSP log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER));
+ Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER));
data.SetData(GetAuxvData());
data.SetByteOrder(m_process->GetByteOrder());
@@ -109,7 +109,7 @@ AuxVector::FindEntry(EntryType type) const
}
void
-AuxVector::DumpToLog(LogSP log) const
+AuxVector::DumpToLog(Log *log) const
{
if (!log)
return;
diff --git a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.h b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.h
index 8b93fd656e0..ea0fe002ec9 100644
--- a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.h
+++ b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.h
@@ -81,7 +81,7 @@ public:
GetEntryName(EntryType type);
void
- DumpToLog(lldb::LogSP log) const;
+ DumpToLog(lldb_private::Log *log) const;
private:
lldb_private::Process *m_process;
diff --git a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
index b57f2c5b0b3..e832739bdc0 100644
--- a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
+++ b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
@@ -295,7 +295,7 @@ DYLDRendezvous::ReadSOEntryFromMemory(lldb::addr_t addr, SOEntry &entry)
}
void
-DYLDRendezvous::DumpToLog(LogSP log) const
+DYLDRendezvous::DumpToLog(Log *log) const
{
int state = GetState();
diff --git a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.h b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.h
index 81cb74f153b..67e7228a38d 100644
--- a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.h
+++ b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.h
@@ -111,7 +111,7 @@ public:
ModulesDidUnload() const { return !m_removed_soentries.empty(); }
void
- DumpToLog(lldb::LogSP log) const;
+ DumpToLog(lldb_private::Log *log) const;
/// @brief Constants describing the state of the rendezvous.
///
diff --git a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
index 410e6beec6d..05e66f38974 100644
--- a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
@@ -111,7 +111,7 @@ ItaniumABILanguageRuntime::GetDynamicTypeAndAddress (ValueObject &in_value,
const char *name = symbol->GetMangled().GetDemangledName().AsCString();
if (strstr(name, vtable_demangled_prefix) == name)
{
- LogSP log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT));
+ Log *log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT));
if (log)
log->Printf ("0x%16.16" PRIx64 ": static-type = '%s' has vtable symbol '%s'\n",
original_ptr,
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
index 52ec43535d8..944cc3507ac 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
@@ -366,7 +366,7 @@ AppleObjCRuntimeV1::UpdateISAToDescriptorMapIfNeeded()
// map, wether it was successful or not.
m_isa_to_descriptor_stop_id = process->GetStopID();
- lldb::LogSP log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
+ Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
ProcessSP process_sp = process->shared_from_this();
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
index 752e526a449..6cfc05a65cb 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
@@ -1638,7 +1638,7 @@ AppleObjCRuntimeV2::GetClassDescriptor (ValueObject& valobj)
objc_class_sp = ObjCLanguageRuntime::GetClassDescriptor (isa);
if (isa && !objc_class_sp)
{
- lldb::LogSP log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
+ Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
if (log)
log->Printf("0x%" PRIx64 ": AppleObjCRuntimeV2::GetClassDescriptor() ISA was not in class descriptor cache 0x%" PRIx64,
isa_pointer,
@@ -1685,7 +1685,7 @@ AppleObjCRuntimeV2::UpdateISAToDescriptorMapDynamic(RemoteNXMapTable &hash_table
if (process == NULL)
return false;
- lldb::LogSP log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
+ Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
ExecutionContext exe_ctx;
@@ -1892,7 +1892,7 @@ AppleObjCRuntimeV2::ParseClassInfoArray (const DataExtractor &data, uint32_t num
// uint32_t hash;
// } __attribute__((__packed__));
- lldb::LogSP log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
+ Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
// Iterate through all ClassInfo structures
lldb::offset_t offset = 0;
@@ -1932,7 +1932,7 @@ AppleObjCRuntimeV2::UpdateISAToDescriptorMapSharedCache()
if (process == NULL)
return false;
- lldb::LogSP log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
+ Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
ExecutionContext exe_ctx;
@@ -2141,7 +2141,7 @@ AppleObjCRuntimeV2::UpdateISAToDescriptorMapSharedCache()
bool
AppleObjCRuntimeV2::UpdateISAToDescriptorMapFromMemory (RemoteNXMapTable &hash_table)
{
- lldb::LogSP log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
+ Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
Process *process = GetProcess();
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
index f54875857d1..28508fdefe0 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
@@ -560,7 +560,7 @@ AppleObjCTrampolineHandler::AppleObjCVTables::ReadRegions (lldb::addr_t region_a
if (!m_process_sp)
return false;
- LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
+ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
// We aren't starting at the trampoline symbol.
InitializeVTableSymbols ();
@@ -711,7 +711,7 @@ AppleObjCTrampolineHandler::SetupDispatchFunction (Thread &thread, ValueList &di
ExecutionContext exe_ctx (thread.shared_from_this());
Address impl_code_address;
StreamString errors;
- LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
+ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
lldb::addr_t args_addr = LLDB_INVALID_ADDRESS;
// Scope for mutex locker:
@@ -865,7 +865,7 @@ AppleObjCTrampolineHandler::GetStepThroughDispatchPlan (Thread &thread, bool sto
if (found_it)
{
- LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
+ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
// We are decoding a method dispatch.
// First job is to pull the arguments out:
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp
index a5e3e63a8d4..a741311c9b0 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp
@@ -37,7 +37,7 @@ public:
static unsigned int invocation_id = 0;
unsigned int current_id = invocation_id++;
- lldb::LogSP log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); // FIXME - a more appropriate log channel?
+ Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); // FIXME - a more appropriate log channel?
if (log)
{
@@ -85,7 +85,7 @@ public:
static unsigned int invocation_id = 0;
unsigned int current_id = invocation_id++;
- lldb::LogSP log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); // FIXME - a more appropriate log channel?
+ Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); // FIXME - a more appropriate log channel?
if (log)
{
@@ -115,7 +115,7 @@ public:
static unsigned int invocation_id = 0;
unsigned int current_id = invocation_id++;
- lldb::LogSP log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); // FIXME - a more appropriate log channel?
+ Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); // FIXME - a more appropriate log channel?
if (log)
{
@@ -326,8 +326,6 @@ public:
clang::ObjCMethodDecl *BuildMethod (clang::ObjCInterfaceDecl *interface_decl, const char *name, bool instance)
{
- lldb::LogSP log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); // FIXME - a more appropriate log channel?
-
if (!m_is_valid || m_type_vector.size() < 3)
return NULL;
@@ -498,7 +496,7 @@ private:
bool
AppleObjCTypeVendor::FinishDecl(clang::ObjCInterfaceDecl *interface_decl)
{
- lldb::LogSP log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); // FIXME - a more appropriate log channel?
+ Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); // FIXME - a more appropriate log channel?
ClangASTMetadata *metadata = m_external_source->GetMetadata(interface_decl);
ObjCLanguageRuntime::ObjCISA objc_isa = 0;
@@ -594,7 +592,7 @@ AppleObjCTypeVendor::FindTypes (const ConstString &name,
static unsigned int invocation_id = 0;
unsigned int current_id = invocation_id++;
- lldb::LogSP log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); // FIXME - a more appropriate log channel?
+ Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); // FIXME - a more appropriate log channel?
if (log)
log->Printf("AppleObjCTypeVendor::FindTypes [%u] ('%s', %s, %u, )",
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp
index 3f0acb6bb21..1a2639cd7ca 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp
@@ -173,7 +173,7 @@ AppleThreadPlanStepThroughObjCTrampoline::ShouldStop (Event *event_ptr)
lldb::addr_t target_addr = target_addr_value.GetScalar().ULongLong();
Address target_so_addr;
target_so_addr.SetOpcodeLoadAddress(target_addr, exc_ctx.GetTargetPtr());
- LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
+ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
if (target_addr == 0)
{
if (log)
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;
}
}
diff --git a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
index d867c891b33..2f9c69870f3 100644
--- a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
+++ b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
@@ -132,7 +132,7 @@ OperatingSystemPython::GetDynamicRegisterInfo ()
{
if (!m_interpreter || !m_python_object_sp)
return NULL;
- LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
+ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
if (log)
log->Printf ("OperatingSystemPython::GetDynamicRegisterInfo() fetching thread register definitions from python for pid %" PRIu64, m_process->GetID());
@@ -175,7 +175,7 @@ OperatingSystemPython::UpdateThreadList (ThreadList &old_thread_list, ThreadList
if (!m_interpreter || !m_python_object_sp)
return false;
- LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
+ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
// First thing we have to do is get the API lock, and the run lock. We're going to change the thread
// content of the process, and we're going to use python, which requires the API lock to do it.
@@ -267,7 +267,7 @@ OperatingSystemPython::CreateRegisterContextForThread (Thread *thread, addr_t re
Target &target = m_process->GetTarget();
Mutex::Locker api_locker (target.GetAPIMutex());
- LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD));
+ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD));
if (reg_data_addr != LLDB_INVALID_ADDRESS)
{
@@ -316,7 +316,7 @@ OperatingSystemPython::CreateThreadStopReason (lldb_private::Thread *thread)
lldb::ThreadSP
OperatingSystemPython::CreateThread (lldb::tid_t tid, addr_t context)
{
- LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD));
+ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD));
if (log)
log->Printf ("OperatingSystemPython::CreateThread (tid = 0x%" PRIx64 ", context = 0x%" PRIx64 ") fetching register data from python", tid, context);
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
index c98b2465fdb..bbde8ed0709 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
@@ -102,7 +102,7 @@ CommunicationKDP::SendRequestAndGetReply (const CommandType command,
{
if (IsRunning())
{
- LogSP log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_PACKETS));
+ Log *log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_PACKETS));
if (log)
{
PacketStreamType log_strm;
@@ -153,7 +153,7 @@ CommunicationKDP::SendRequestPacketNoLock (const PacketStreamType &request_packe
const char *packet_data = request_packet.GetData();
const size_t packet_size = request_packet.GetSize();
- LogSP log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_PACKETS));
+ Log *log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_PACKETS));
if (log)
{
PacketStreamType log_strm;
@@ -202,7 +202,7 @@ CommunicationKDP::WaitForPacketWithTimeoutMicroSecondsNoLock (DataExtractor &pac
uint8_t buffer[8192];
Error error;
- LogSP log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_PACKETS | KDP_LOG_VERBOSE));
+ Log *log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_PACKETS | KDP_LOG_VERBOSE));
// Check for a packet from our cache first without trying any reading...
if (CheckForPacket (NULL, 0, packet))
@@ -257,7 +257,7 @@ CommunicationKDP::CheckForPacket (const uint8_t *src, size_t src_len, DataExtrac
// Put the packet data into the buffer in a thread safe fashion
Mutex::Locker locker(m_bytes_mutex);
- LogSP log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_PACKETS));
+ Log *log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_PACKETS));
if (src && src_len > 0)
{
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
index f27c5f8fa3f..339c83a3098 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
@@ -333,7 +333,7 @@ ProcessKDP::DoAttachToProcessWithName (const char *process_name, bool wait_for_l
void
ProcessKDP::DidAttach ()
{
- LogSP log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_PROCESS));
+ Log *log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_PROCESS));
if (log)
log->Printf ("ProcessKDP::DidAttach()");
if (GetID() != LLDB_INVALID_PROCESS_ID)
@@ -366,7 +366,7 @@ Error
ProcessKDP::DoResume ()
{
Error error;
- LogSP log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_PROCESS));
+ Log *log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_PROCESS));
// Only start the async thread if we try to do any process control
if (!IS_VALID_LLDB_HOST_THREAD(m_async_thread))
StartAsyncThread ();
@@ -445,7 +445,7 @@ bool
ProcessKDP::UpdateThreadList (ThreadList &old_thread_list, ThreadList &new_thread_list)
{
// locker will keep a mutex locked until it goes out of scope
- LogSP log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_THREAD));
+ Log *log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_THREAD));
if (log && log->GetMask().Test(KDP_LOG_VERBOSE))
log->Printf ("ProcessKDP::%s (pid = %" PRIu64 ")", __FUNCTION__, GetID());
@@ -490,7 +490,7 @@ Error
ProcessKDP::DoDetach()
{
Error error;
- LogSP log (ProcessKDPLog::GetLogIfAllCategoriesSet(KDP_LOG_PROCESS));
+ Log *log (ProcessKDPLog::GetLogIfAllCategoriesSet(KDP_LOG_PROCESS));
if (log)
log->Printf ("ProcessKDP::DoDetach()");
@@ -695,7 +695,7 @@ ProcessKDP::Initialize()
bool
ProcessKDP::StartAsyncThread ()
{
- LogSP log (ProcessKDPLog::GetLogIfAllCategoriesSet(KDP_LOG_PROCESS));
+ Log *log (ProcessKDPLog::GetLogIfAllCategoriesSet(KDP_LOG_PROCESS));
if (log)
log->Printf ("ProcessKDP::StartAsyncThread ()");
@@ -710,7 +710,7 @@ ProcessKDP::StartAsyncThread ()
void
ProcessKDP::StopAsyncThread ()
{
- LogSP log (ProcessKDPLog::GetLogIfAllCategoriesSet(KDP_LOG_PROCESS));
+ Log *log (ProcessKDPLog::GetLogIfAllCategoriesSet(KDP_LOG_PROCESS));
if (log)
log->Printf ("ProcessKDP::StopAsyncThread ()");
@@ -733,7 +733,7 @@ ProcessKDP::AsyncThread (void *arg)
const lldb::pid_t pid = process->GetID();
- LogSP log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_PROCESS));
+ Log *log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_PROCESS));
if (log)
log->Printf ("ProcessKDP::AsyncThread (arg = %p, pid = %" PRIu64 ") thread starting...", arg, pid);
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDPLog.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDPLog.cpp
index ff3c46ece3f..53b08d53c24 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDPLog.cpp
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDPLog.cpp
@@ -22,22 +22,25 @@ using namespace lldb_private;
// control access to our static g_log_sp by hiding it in a singleton function
// that will construct the static g_lob_sp the first time this function is
// called.
-static LogSP &
+static bool g_log_enabled = false;
+static Log * g_log = NULL;
+static Log *
GetLog ()
{
- static LogSP g_log_sp;
- return g_log_sp;
+ if (!g_log_enabled)
+ return NULL;
+ return g_log;
}
-LogSP
+Log *
ProcessKDPLog::GetLogIfAllCategoriesSet (uint32_t mask)
{
- LogSP log(GetLog ());
+ Log *log(GetLog ());
if (log && mask)
{
uint32_t log_mask = log->GetMask().Get();
if ((log_mask & mask) != mask)
- return LogSP();
+ return NULL;
}
return log;
}
@@ -45,7 +48,7 @@ ProcessKDPLog::GetLogIfAllCategoriesSet (uint32_t mask)
void
ProcessKDPLog::DisableLog (const char **categories, Stream *feedback_strm)
{
- LogSP log (GetLog ());
+ Log *log (GetLog ());
if (log)
{
uint32_t flag_bits = 0;
@@ -81,33 +84,33 @@ ProcessKDPLog::DisableLog (const char **categories, Stream *feedback_strm)
}
}
+ log->GetMask().Reset (flag_bits);
if (flag_bits == 0)
- GetLog ().reset();
- else
- log->GetMask().Reset (flag_bits);
+ g_log_enabled = false;
}
return;
}
-LogSP
+Log *
ProcessKDPLog::EnableLog (StreamSP &log_stream_sp, uint32_t log_options, const char **categories, Stream *feedback_strm)
{
// Try see if there already is a log - that way we can reuse its settings.
// We could reuse the log in toto, but we don't know that the stream is the same.
uint32_t flag_bits = 0;
- LogSP log(GetLog ());
- if (log)
- flag_bits = log->GetMask().Get();
+ if (g_log)
+ flag_bits = g_log->GetMask().Get();
// Now make a new log with this stream if one was provided
if (log_stream_sp)
{
- log.reset (new Log(log_stream_sp));
- GetLog () = log;
+ if (g_log)
+ g_log->SetStream(log_stream_sp);
+ else
+ g_log = new Log(log_stream_sp);
}
- if (log)
+ if (g_log)
{
bool got_unknown_category = false;
for (size_t i=0; categories[i] != NULL; ++i)
@@ -140,10 +143,11 @@ ProcessKDPLog::EnableLog (StreamSP &log_stream_sp, uint32_t log_options, const c
}
if (flag_bits == 0)
flag_bits = KDP_LOG_DEFAULT;
- log->GetMask().Reset(flag_bits);
- log->GetOptions().Reset(log_options);
+ g_log->GetMask().Reset(flag_bits);
+ g_log->GetOptions().Reset(log_options);
}
- return log;
+ g_log_enabled = true;
+ return g_log;
}
void
@@ -170,7 +174,7 @@ ProcessKDPLog::ListLogCategories (Stream *strm)
void
ProcessKDPLog::LogIf (uint32_t mask, const char *format, ...)
{
- LogSP log (ProcessKDPLog::GetLogIfAllCategoriesSet (mask));
+ Log *log (ProcessKDPLog::GetLogIfAllCategoriesSet (mask));
if (log)
{
va_list args;
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDPLog.h b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDPLog.h
index ffdc471ff3a..0cb32d9b2dc 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDPLog.h
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDPLog.h
@@ -35,13 +35,13 @@
class ProcessKDPLog
{
public:
- static lldb::LogSP
+ static lldb_private::Log *
GetLogIfAllCategoriesSet(uint32_t mask = 0);
static void
DisableLog (const char **categories, lldb_private::Stream *feedback_strm);
- static lldb::LogSP
+ static lldb_private::Log *
EnableLog (lldb::StreamSP &log_stream_sp, uint32_t log_options, const char **categories, lldb_private::Stream *feedback_strm);
static void
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp
index 33c5e47d0b2..8ce90e57fde 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp
@@ -76,7 +76,7 @@ ThreadKDP::WillResume (StateType resume_state)
ClearStackFrames();
- lldb::LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_STEP));
+ Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_STEP));
if (log)
log->Printf ("Resuming thread: %4.4" PRIx64 " with state: %s.", GetID(), StateAsCString(resume_state));
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
index 6b52a62ecb2..8eb4c612bdf 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
@@ -87,7 +87,7 @@ RegisterContextLLDB::RegisterContextLLDB
void
RegisterContextLLDB::InitializeZerothFrame()
{
- LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_UNWIND));
+ Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_UNWIND));
ExecutionContext exe_ctx(m_thread.shared_from_this());
RegisterContextSP reg_ctx_sp = m_thread.GetRegisterContext();
@@ -227,7 +227,7 @@ RegisterContextLLDB::InitializeZerothFrame()
void
RegisterContextLLDB::InitializeNonZerothFrame()
{
- LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_UNWIND));
+ Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_UNWIND));
if (IsFrameZero ())
{
m_frame_type = eNotAValidFrame;
@@ -591,7 +591,7 @@ RegisterContextLLDB::GetFastUnwindPlanForFrame ()
{
if (unwind_plan_sp->PlanValidAtAddress (m_current_pc))
{
- LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_UNWIND));
+ Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_UNWIND));
if (log && log->GetVerbose())
{
if (m_fast_unwind_plan_sp)
@@ -1456,7 +1456,7 @@ RegisterContextLLDB::ReadPC (addr_t& pc)
void
RegisterContextLLDB::UnwindLogMsg (const char *fmt, ...)
{
- LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_UNWIND));
+ Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_UNWIND));
if (log)
{
va_list args;
@@ -1482,7 +1482,7 @@ RegisterContextLLDB::UnwindLogMsg (const char *fmt, ...)
void
RegisterContextLLDB::UnwindLogMsgVerbose (const char *fmt, ...)
{
- LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_UNWIND));
+ Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_UNWIND));
if (log && log->GetVerbose())
{
va_list args;
diff --git a/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp b/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp
index 4f4d2182f25..db0306bd015 100644
--- a/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp
+++ b/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp
@@ -108,7 +108,7 @@ UnwindLLDB::AddOneMoreFrame (ABI *abi)
if (m_unwind_complete)
return false;
- LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_UNWIND));
+ Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_UNWIND));
CursorSP cursor_sp(new Cursor ());
// Frame zero is a little different
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
index fd9cecaa397..edce0543579 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
@@ -171,7 +171,7 @@ GDBRemoteCommunication::CalculcateChecksum (const char *payload, size_t payload_
size_t
GDBRemoteCommunication::SendAck ()
{
- LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PACKETS));
+ Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PACKETS));
ConnectionStatus status = eConnectionStatusSuccess;
char ch = '+';
const size_t bytes_written = Write (&ch, 1, status, NULL);
@@ -184,7 +184,7 @@ GDBRemoteCommunication::SendAck ()
size_t
GDBRemoteCommunication::SendNack ()
{
- LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PACKETS));
+ Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PACKETS));
ConnectionStatus status = eConnectionStatusSuccess;
char ch = '-';
const size_t bytes_written = Write (&ch, 1, status, NULL);
@@ -213,7 +213,7 @@ GDBRemoteCommunication::SendPacketNoLock (const char *payload, size_t payload_le
packet.PutChar('#');
packet.PutHex8(CalculcateChecksum (payload, payload_length));
- LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PACKETS));
+ Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PACKETS));
ConnectionStatus status = eConnectionStatusSuccess;
size_t bytes_written = Write (packet.GetData(), packet.GetSize(), status, NULL);
if (log)
@@ -223,7 +223,7 @@ GDBRemoteCommunication::SendPacketNoLock (const char *payload, size_t payload_le
// logs all of the packet will set a boolean so that we don't dump this more
// than once
if (!m_history.DidDumpToLog ())
- m_history.Dump (log.get());
+ m_history.Dump (log);
log->Printf ("<%4zu> send packet: %.*s", bytes_written, (int)packet.GetSize(), packet.GetData());
}
@@ -285,7 +285,7 @@ GDBRemoteCommunication::WaitForPacketWithTimeoutMicroSecondsNoLock (StringExtrac
uint8_t buffer[8192];
Error error;
- LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PACKETS | GDBR_LOG_VERBOSE));
+ Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PACKETS | GDBR_LOG_VERBOSE));
// Check for a packet from our cache first without trying any reading...
if (CheckForPacket (NULL, 0, packet))
@@ -340,7 +340,7 @@ GDBRemoteCommunication::CheckForPacket (const uint8_t *src, size_t src_len, Stri
// Put the packet data into the buffer in a thread safe fashion
Mutex::Locker locker(m_bytes_mutex);
- LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PACKETS));
+ Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PACKETS));
if (src && src_len > 0)
{
@@ -457,7 +457,7 @@ GDBRemoteCommunication::CheckForPacket (const uint8_t *src, size_t src_len, Stri
// logs all of the packet will set a boolean so that we don't dump this more
// than once
if (!m_history.DidDumpToLog ())
- m_history.Dump (log.get());
+ m_history.Dump (log);
log->Printf ("<%4zu> read packet: %.*s", total_length, (int)(total_length), m_bytes.c_str());
}
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
index df89058d6a6..9351b93761b 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -311,7 +311,7 @@ GDBRemoteCommunicationClient::SendPacketAndWaitForResponse
)
{
Mutex::Locker locker;
- LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PROCESS));
+ Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PROCESS));
size_t response_len = 0;
if (GetSequenceMutex (locker))
{
@@ -527,7 +527,7 @@ GDBRemoteCommunicationClient::SendContinuePacketAndWaitForResponse
)
{
m_curr_tid = LLDB_INVALID_THREAD_ID;
- LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PROCESS));
+ Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PROCESS));
if (log)
log->Printf ("GDBRemoteCommunicationClient::%s ()", __FUNCTION__);
@@ -677,7 +677,7 @@ GDBRemoteCommunicationClient::SendContinuePacketAndWaitForResponse
}
else if (m_async_packet_predicate.GetValue())
{
- LogSP packet_log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PACKETS));
+ Log * packet_log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PACKETS));
// We are supposed to send an asynchronous packet while
// we are running.
@@ -837,7 +837,7 @@ GDBRemoteCommunicationClient::SendInterrupt
)
{
timed_out = false;
- LogSP log (ProcessGDBRemoteLog::GetLogIfAnyCategoryIsSet (GDBR_LOG_PROCESS | GDBR_LOG_PACKETS));
+ Log *log (ProcessGDBRemoteLog::GetLogIfAnyCategoryIsSet (GDBR_LOG_PROCESS | GDBR_LOG_PACKETS));
if (IsRunning())
{
@@ -2283,7 +2283,7 @@ GDBRemoteCommunicationClient::GetCurrentThreadIDs (std::vector<lldb::tid_t> &thr
#if defined (LLDB_CONFIGURATION_DEBUG)
// assert(!"ProcessGDBRemote::UpdateThreadList() failed due to not getting the sequence mutex");
#else
- LogSP log (ProcessGDBRemoteLog::GetLogIfAnyCategoryIsSet (GDBR_LOG_PROCESS | GDBR_LOG_PACKETS));
+ Log *log (ProcessGDBRemoteLog::GetLogIfAnyCategoryIsSet (GDBR_LOG_PROCESS | GDBR_LOG_PACKETS));
if (log)
log->Printf("error: failed to get packet sequence mutex, not sending packet 'qfThreadInfo'");
#endif
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
index e83ea40c91e..7f7361522a4 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
@@ -60,7 +60,7 @@ GDBRemoteCommunicationServer::~GDBRemoteCommunicationServer()
//{
// GDBRemoteCommunicationServer *server = (GDBRemoteCommunicationServer*) arg;
//
-// LogSP log;// (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PROCESS));
+// Log *log;// (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PROCESS));
// if (log)
// log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %i) thread starting...", __FUNCTION__, arg, process->GetID());
//
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
index 08c9de74b15..bf3dc4d8636 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
@@ -248,13 +248,13 @@ GDBRemoteRegisterContext::ReadRegisterBytes (const RegisterInfo *reg_info, DataE
}
else
{
- LogSP log (ProcessGDBRemoteLog::GetLogIfAnyCategoryIsSet (GDBR_LOG_THREAD | GDBR_LOG_PACKETS));
#if LLDB_CONFIGURATION_DEBUG
StreamString strm;
gdb_comm.DumpHistory(strm);
Host::SetCrashDescription (strm.GetData());
assert (!"Didn't get sequence mutex for read register.");
#else
+ Log *log (ProcessGDBRemoteLog::GetLogIfAnyCategoryIsSet (GDBR_LOG_THREAD | GDBR_LOG_PACKETS));
if (log)
{
if (log->GetVerbose())
@@ -468,7 +468,7 @@ GDBRemoteRegisterContext::WriteRegisterBytes (const lldb_private::RegisterInfo *
}
else
{
- LogSP log (ProcessGDBRemoteLog::GetLogIfAnyCategoryIsSet (GDBR_LOG_THREAD | GDBR_LOG_PACKETS));
+ Log *log (ProcessGDBRemoteLog::GetLogIfAnyCategoryIsSet (GDBR_LOG_THREAD | GDBR_LOG_PACKETS));
if (log)
{
if (log->GetVerbose())
@@ -540,7 +540,7 @@ GDBRemoteRegisterContext::ReadAllRegisterValues (lldb::DataBufferSP &data_sp)
}
else
{
- LogSP log (ProcessGDBRemoteLog::GetLogIfAnyCategoryIsSet (GDBR_LOG_THREAD | GDBR_LOG_PACKETS));
+ Log *log (ProcessGDBRemoteLog::GetLogIfAnyCategoryIsSet (GDBR_LOG_THREAD | GDBR_LOG_PACKETS));
if (log)
{
if (log->GetVerbose())
@@ -673,7 +673,7 @@ GDBRemoteRegisterContext::WriteAllRegisterValues (const lldb::DataBufferSP &data
}
else
{
- LogSP log (ProcessGDBRemoteLog::GetLogIfAnyCategoryIsSet (GDBR_LOG_THREAD | GDBR_LOG_PACKETS));
+ Log *log (ProcessGDBRemoteLog::GetLogIfAnyCategoryIsSet (GDBR_LOG_THREAD | GDBR_LOG_PACKETS));
if (log)
{
if (log->GetVerbose())
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 07f4d7b70c1..05c39f97fb5 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -578,7 +578,7 @@ ProcessGDBRemote::DoLaunch (Module *exe_module, const ProcessLaunchInfo &launch_
// ::LogSetBitMask (GDBR_LOG_DEFAULT);
// ::LogSetOptions (LLDB_LOG_OPTION_THREADSAFE | LLDB_LOG_OPTION_PREPEND_TIMESTAMP | LLDB_LOG_OPTION_PREPEND_PROC_AND_THREAD);
// ::LogSetLogFile ("/dev/stdout");
- LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PROCESS));
+ Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PROCESS));
ObjectFile * object_file = exe_module->GetObjectFile();
if (object_file)
@@ -798,7 +798,7 @@ ProcessGDBRemote::ConnectToDebugserver (const char *connect_url)
void
ProcessGDBRemote::DidLaunchOrAttach ()
{
- LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PROCESS));
+ Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PROCESS));
if (log)
log->Printf ("ProcessGDBRemote::DidLaunch()");
if (GetID() != LLDB_INVALID_PROCESS_ID)
@@ -1036,7 +1036,7 @@ Error
ProcessGDBRemote::DoResume ()
{
Error error;
- LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PROCESS));
+ Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PROCESS));
if (log)
log->Printf ("ProcessGDBRemote::Resume()");
@@ -1293,7 +1293,7 @@ bool
ProcessGDBRemote::UpdateThreadList (ThreadList &old_thread_list, ThreadList &new_thread_list)
{
// locker will keep a mutex locked until it goes out of scope
- LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_THREAD));
+ Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_THREAD));
if (log && log->GetMask().Test(GDBR_LOG_VERBOSE))
log->Printf ("ProcessGDBRemote::%s (pid = %" PRIu64 ")", __FUNCTION__, GetID());
@@ -1680,7 +1680,7 @@ ProcessGDBRemote::InterruptIfRunning
{
Error error;
- LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
+ Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
bool paused_private_state_thread = false;
const bool is_running = m_gdb_comm.IsRunning();
@@ -1749,7 +1749,7 @@ ProcessGDBRemote::InterruptIfRunning
Error
ProcessGDBRemote::WillDetach ()
{
- LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
+ Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
if (log)
log->Printf ("ProcessGDBRemote::WillDetach()");
@@ -1767,7 +1767,7 @@ Error
ProcessGDBRemote::DoDetach()
{
Error error;
- LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
+ Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
if (log)
log->Printf ("ProcessGDBRemote::DoDetach()");
@@ -1798,7 +1798,7 @@ Error
ProcessGDBRemote::DoDestroy ()
{
Error error;
- LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
+ Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
if (log)
log->Printf ("ProcessGDBRemote::DoDestroy()");
@@ -2177,7 +2177,7 @@ ProcessGDBRemote::EnableBreakpointSite (BreakpointSite *bp_site)
Error error;
assert (bp_site != NULL);
- LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_BREAKPOINTS));
+ Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_BREAKPOINTS));
user_id_t site_id = bp_site->GetID();
const addr_t addr = bp_site->GetLoadAddress();
if (log)
@@ -2241,7 +2241,7 @@ ProcessGDBRemote::DisableBreakpointSite (BreakpointSite *bp_site)
assert (bp_site != NULL);
addr_t addr = bp_site->GetLoadAddress();
user_id_t site_id = bp_site->GetID();
- LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_BREAKPOINTS));
+ Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_BREAKPOINTS));
if (log)
log->Printf ("ProcessGDBRemote::DisableBreakpointSite (site_id = %" PRIu64 ") addr = 0x%8.8" PRIx64, site_id, (uint64_t)addr);
@@ -2307,7 +2307,7 @@ ProcessGDBRemote::EnableWatchpoint (Watchpoint *wp, bool notify)
{
user_id_t watchID = wp->GetID();
addr_t addr = wp->GetLoadAddress();
- LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_WATCHPOINTS));
+ Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_WATCHPOINTS));
if (log)
log->Printf ("ProcessGDBRemote::EnableWatchpoint(watchID = %" PRIu64 ")", watchID);
if (wp->IsEnabled())
@@ -2349,7 +2349,7 @@ ProcessGDBRemote::DisableWatchpoint (Watchpoint *wp, bool notify)
{
user_id_t watchID = wp->GetID();
- LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_WATCHPOINTS));
+ Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_WATCHPOINTS));
addr_t addr = wp->GetLoadAddress();
@@ -2401,7 +2401,7 @@ Error
ProcessGDBRemote::DoSignal (int signo)
{
Error error;
- LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
+ Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
if (log)
log->Printf ("ProcessGDBRemote::DoSignal (signal = %d)", signo);
@@ -2464,7 +2464,7 @@ ProcessGDBRemote::StartDebugserverProcess (const char *debugserver_url, const Pr
m_stdio_communication.Clear();
- LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PROCESS));
+ Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PROCESS));
Args &debugserver_args = debugserver_launch_info.GetArguments();
char arg_cstr[PATH_MAX];
@@ -2553,7 +2553,7 @@ ProcessGDBRemote::StartDebugserverProcess (const char *debugserver_url, const Pr
m_debugserver_pid = LLDB_INVALID_PROCESS_ID;
if (error.Fail() || log)
- error.PutToLog(log.get(), "Host::LaunchProcess (launch_info) => pid=%" PRIu64 ", path='%s'", m_debugserver_pid, debugserver_path);
+ error.PutToLog(log, "Host::LaunchProcess (launch_info) => pid=%" PRIu64 ", path='%s'", m_debugserver_pid, debugserver_path);
}
else
{
@@ -2588,7 +2588,7 @@ ProcessGDBRemote::MonitorDebugserverProcess
// "debugserver_pid" argument passed in is the process ID for
// debugserver that we are tracking...
- LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
+ Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
ProcessGDBRemote *process = (ProcessGDBRemote *)callback_baton;
@@ -2689,7 +2689,7 @@ ProcessGDBRemote::Initialize()
bool
ProcessGDBRemote::StartAsyncThread ()
{
- LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
+ Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
if (log)
log->Printf ("ProcessGDBRemote::%s ()", __FUNCTION__);
@@ -2724,7 +2724,7 @@ ProcessGDBRemote::StartAsyncThread ()
void
ProcessGDBRemote::StopAsyncThread ()
{
- LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
+ Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
if (log)
log->Printf ("ProcessGDBRemote::%s ()", __FUNCTION__);
@@ -2757,7 +2757,7 @@ ProcessGDBRemote::AsyncThread (void *arg)
{
ProcessGDBRemote *process = (ProcessGDBRemote*) arg;
- LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PROCESS));
+ Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PROCESS));
if (log)
log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64 ") thread starting...", __FUNCTION__, arg, process->GetID());
@@ -2990,7 +2990,7 @@ ProcessGDBRemote::NewThreadNotifyBreakpointHit (void *baton,
{
// I don't think I have to do anything here, just make sure I notice the new thread when it starts to
// run so I can stop it if that's what I want to do.
- LogSP log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
+ Log *log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
if (log)
log->Printf("Hit New Thread Notification breakpoint.");
return false;
@@ -3000,7 +3000,7 @@ ProcessGDBRemote::NewThreadNotifyBreakpointHit (void *baton,
bool
ProcessGDBRemote::StartNoticingNewThreads()
{
- LogSP log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
+ Log *log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
if (m_thread_create_bp_sp)
{
if (log && log->GetVerbose())
@@ -3032,7 +3032,7 @@ ProcessGDBRemote::StartNoticingNewThreads()
bool
ProcessGDBRemote::StopNoticingNewThreads()
{
- LogSP log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
+ Log *log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
if (log && log->GetVerbose())
log->Printf ("Disabling new thread notification breakpoint.");
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp
index cb764238683..2bb6826e223 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp
@@ -22,39 +22,43 @@ using namespace lldb_private;
// control access to our static g_log_sp by hiding it in a singleton function
// that will construct the static g_lob_sp the first time this function is
// called.
-static LogSP &
+static bool g_log_enabled = false;
+static Log * g_log = NULL;
+static Log *
GetLog ()
{
- static LogSP g_log_sp;
- return g_log_sp;
+ if (!g_log_enabled)
+ return NULL;
+ return g_log;
}
-LogSP
+
+Log *
ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (uint32_t mask)
{
- LogSP log(GetLog ());
+ Log *log(GetLog ());
if (log && mask)
{
uint32_t log_mask = log->GetMask().Get();
if ((log_mask & mask) != mask)
- return LogSP();
+ return NULL;
}
return log;
}
-LogSP
+Log *
ProcessGDBRemoteLog::GetLogIfAnyCategoryIsSet (uint32_t mask)
{
- LogSP log(GetLog ());
+ Log *log(GetLog ());
if (log && log->GetMask().Get() & mask)
return log;
- return LogSP();
+ return NULL;
}
void
ProcessGDBRemoteLog::DisableLog (const char **categories, Stream *feedback_strm)
{
- LogSP log (GetLog ());
+ Log *log (GetLog ());
if (log)
{
uint32_t flag_bits = 0;
@@ -91,7 +95,7 @@ ProcessGDBRemoteLog::DisableLog (const char **categories, Stream *feedback_strm)
}
if (flag_bits == 0)
- GetLog ().reset();
+ g_log_enabled = false;
else
log->GetMask().Reset (flag_bits);
}
@@ -99,24 +103,25 @@ ProcessGDBRemoteLog::DisableLog (const char **categories, Stream *feedback_strm)
return;
}
-LogSP
+Log *
ProcessGDBRemoteLog::EnableLog (StreamSP &log_stream_sp, uint32_t log_options, const char **categories, Stream *feedback_strm)
{
// Try see if there already is a log - that way we can reuse its settings.
// We could reuse the log in toto, but we don't know that the stream is the same.
uint32_t flag_bits = 0;
- LogSP log(GetLog ());
- if (log)
- flag_bits = log->GetMask().Get();
+ if (g_log)
+ flag_bits = g_log->GetMask().Get();
// Now make a new log with this stream if one was provided
if (log_stream_sp)
{
- log.reset (new Log(log_stream_sp));
- GetLog () = log;
+ if (g_log)
+ g_log->SetStream(log_stream_sp);
+ else
+ g_log = new Log(log_stream_sp);
}
- if (log)
+ if (g_log)
{
bool got_unknown_category = false;
for (size_t i=0; categories[i] != NULL; ++i)
@@ -149,10 +154,11 @@ ProcessGDBRemoteLog::EnableLog (StreamSP &log_stream_sp, uint32_t log_options, c
}
if (flag_bits == 0)
flag_bits = GDBR_LOG_DEFAULT;
- log->GetMask().Reset(flag_bits);
- log->GetOptions().Reset(log_options);
+ g_log->GetMask().Reset(flag_bits);
+ g_log->GetOptions().Reset(log_options);
}
- return log;
+ g_log_enabled = true;
+ return g_log;
}
void
@@ -179,7 +185,7 @@ ProcessGDBRemoteLog::ListLogCategories (Stream *strm)
void
ProcessGDBRemoteLog::LogIf (uint32_t mask, const char *format, ...)
{
- LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (mask));
+ Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (mask));
if (log)
{
va_list args;
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.h b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.h
index cf5e176a213..93734067f13 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.h
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.h
@@ -35,16 +35,16 @@
class ProcessGDBRemoteLog
{
public:
- static lldb::LogSP
+ static lldb_private::Log *
GetLogIfAllCategoriesSet(uint32_t mask = 0);
- static lldb::LogSP
+ static lldb_private::Log *
GetLogIfAnyCategoryIsSet (uint32_t mask);
static void
DisableLog (const char **categories, lldb_private::Stream *feedback_strm);
- static lldb::LogSP
+ static lldb_private::Log *
EnableLog (lldb::StreamSP &log_stream_sp, uint32_t log_options, const char **categories, lldb_private::Stream *feedback_strm);
static void
diff --git a/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
index 001cc60aea1..4ac3f687aba 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
@@ -95,7 +95,7 @@ ThreadGDBRemote::WillResume (StateType resume_state)
ClearStackFrames();
int signo = GetResumeSignal();
- lldb::LogSP log(lldb_private::GetLogIfAnyCategoriesSet (GDBR_LOG_THREAD));
+ Log *log(lldb_private::GetLogIfAnyCategoriesSet (GDBR_LOG_THREAD));
if (log)
log->Printf ("Resuming thread: %4.4" PRIx64 " with state: %s.", GetID(), StateAsCString(resume_state));
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
index 40d5bd269d3..ebfd1e0420d 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
@@ -174,10 +174,10 @@ DWARFCompileUnit::ExtractDIEsIfNeeded (bool cu_die_only)
// Keep a flat array of the DIE for binary lookup by DIE offset
if (!cu_die_only)
{
- LogSP log (LogChannelDWARF::GetLogIfAny(DWARF_LOG_DEBUG_INFO | DWARF_LOG_LOOKUPS));
+ Log *log (LogChannelDWARF::GetLogIfAny(DWARF_LOG_DEBUG_INFO | DWARF_LOG_LOOKUPS));
if (log)
{
- m_dwarf2Data->GetObjectFile()->GetModule()->LogMessageVerboseBacktrace (log.get(),
+ m_dwarf2Data->GetObjectFile()->GetModule()->LogMessageVerboseBacktrace (log,
"DWARFCompileUnit::ExtractDIEsIfNeeded () for compile unit at .debug_info[0x%8.8x]",
GetOffset());
}
@@ -288,7 +288,7 @@ DWARFCompileUnit::ExtractDIEsIfNeeded (bool cu_die_only)
DWARFDebugInfoEntry::collection exact_size_die_array (m_die_array.begin(), m_die_array.end());
exact_size_die_array.swap (m_die_array);
}
- LogSP log (LogChannelDWARF::GetLogIfAll (DWARF_LOG_DEBUG_INFO | DWARF_LOG_VERBOSE));
+ Log *log (LogChannelDWARF::GetLogIfAll (DWARF_LOG_DEBUG_INFO | DWARF_LOG_VERBOSE));
if (log)
{
StreamString strm;
@@ -434,11 +434,11 @@ DWARFCompileUnit::GetFunctionAranges ()
if (m_func_aranges_ap.get() == NULL)
{
m_func_aranges_ap.reset (new DWARFDebugAranges());
- LogSP log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_ARANGES));
+ Log *log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_ARANGES));
if (log)
{
- m_dwarf2Data->GetObjectFile()->GetModule()->LogMessage (log.get(),
+ m_dwarf2Data->GetObjectFile()->GetModule()->LogMessage (log,
"DWARFCompileUnit::GetFunctionAranges() for compile unit at .debug_info[0x%8.8x]",
GetOffset());
}
@@ -609,11 +609,11 @@ DWARFCompileUnit::Index (const uint32_t cu_idx,
const uint8_t *fixed_form_sizes = DWARFFormValue::GetFixedFormSizesForAddressSize (GetAddressByteSize());
- LogSP log (LogChannelDWARF::GetLogIfAll (DWARF_LOG_LOOKUPS));
+ Log *log (LogChannelDWARF::GetLogIfAll (DWARF_LOG_LOOKUPS));
if (log)
{
- m_dwarf2Data->GetObjectFile()->GetModule()->LogMessage (log.get(),
+ m_dwarf2Data->GetObjectFile()->GetModule()->LogMessage (log,
"DWARFCompileUnit::Index() for compile unit at .debug_info[0x%8.8x]",
GetOffset());
}
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp
index bcf62b88fef..3b004c4b389 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp
@@ -138,7 +138,7 @@ DWARFDebugAranges::Sort (bool minimize)
Timer scoped_timer(__PRETTY_FUNCTION__, "%s this = %p",
__PRETTY_FUNCTION__, this);
- LogSP log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_ARANGES));
+ Log *log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_ARANGES));
size_t orig_arange_size = 0;
if (log)
{
@@ -160,7 +160,7 @@ DWARFDebugAranges::Sort (bool minimize)
(uint64_t)delta,
(uint64_t)delta * sizeof(Range));
}
- Dump (log.get());
+ Dump (log);
}
}
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
index 2015b2441f1..40300922713 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
@@ -54,7 +54,7 @@ DWARFDebugInfo::GetCompileUnitAranges ()
{
if (m_cu_aranges_ap.get() == NULL && m_dwarf2Data)
{
- LogSP log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_ARANGES));
+ Log *log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_ARANGES));
m_cu_aranges_ap.reset (new DWARFDebugAranges());
const DataExtractor &debug_aranges_data = m_dwarf2Data->get_debug_aranges_data();
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp
index 0a19aa2cbdd..6c9336a0842 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp
@@ -578,7 +578,7 @@ DWARFDebugLine::ParseStatementTable
void* userData
)
{
- LogSP log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_LINE));
+ Log *log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_LINE));
Prologue::shared_ptr prologue(new Prologue());
@@ -598,11 +598,11 @@ DWARFDebugLine::ParseStatementTable
}
if (log)
- prologue->Dump (log.get());
+ prologue->Dump (log);
const dw_offset_t end_offset = debug_line_offset + prologue->total_length + sizeof(prologue->total_length);
- State state(prologue, log.get(), callback, userData);
+ State state(prologue, log, callback, userData);
while (*offset_ptr < end_offset)
{
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp
index 8e7191e4cb4..3e511007a1e 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp
@@ -34,7 +34,7 @@ DWARFDebugPubnames::Extract(const DataExtractor& data)
Timer scoped_timer (__PRETTY_FUNCTION__,
"DWARFDebugPubnames::Extract (byte_size = %" PRIu64 ")",
(uint64_t)data.GetByteSize());
- LogSP log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_PUBNAMES));
+ Log *log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_PUBNAMES));
if (log)
log->Printf("DWARFDebugPubnames::Extract (byte_size = %" PRIu64 ")", (uint64_t)data.GetByteSize());
@@ -54,7 +54,7 @@ DWARFDebugPubnames::Extract(const DataExtractor& data)
break;
}
if (log)
- Dump (log.get());
+ Dump (log);
return true;
}
return false;
@@ -68,7 +68,7 @@ DWARFDebugPubnames::GeneratePubnames(SymbolFileDWARF* dwarf2Data)
"DWARFDebugPubnames::GeneratePubnames (data = %p)",
dwarf2Data);
- LogSP log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_PUBNAMES));
+ Log *log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_PUBNAMES));
if (log)
log->Printf("DWARFDebugPubnames::GeneratePubnames (data = %p)", dwarf2Data);
@@ -206,7 +206,7 @@ DWARFDebugPubnames::GeneratePubnames(SymbolFileDWARF* dwarf2Data)
if (m_sets.empty())
return false;
if (log)
- Dump (log.get());
+ Dump (log);
return true;
}
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp
index 10f8cef2594..54e789e1fef 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp
@@ -86,18 +86,16 @@ void
LogChannelDWARF::Delete ()
{
g_log_channel = NULL;
- m_log_sp.reset();
}
void
LogChannelDWARF::Disable (const char **categories, Stream *feedback_strm)
{
- if (!m_log_sp)
+ if (m_log_ap.get() == NULL)
return;
- g_log_channel = this;
- uint32_t flag_bits = m_log_sp->GetMask().Get();
+ uint32_t flag_bits = m_log_ap->GetMask().Get();
for (size_t i = 0; categories[i] != NULL; ++i)
{
const char *arg = categories[i];
@@ -122,7 +120,7 @@ LogChannelDWARF::Disable (const char **categories, Stream *feedback_strm)
if (flag_bits == 0)
Delete ();
else
- m_log_sp->GetMask().Reset (flag_bits);
+ m_log_ap->GetMask().Reset (flag_bits);
return;
}
@@ -138,7 +136,11 @@ LogChannelDWARF::Enable
{
Delete ();
- m_log_sp.reset(new Log (log_stream_sp));
+ if (m_log_ap)
+ m_log_ap->SetStream(log_stream_sp);
+ else
+ m_log_ap.reset(new Log (log_stream_sp));
+
g_log_channel = this;
uint32_t flag_bits = 0;
bool got_unknown_category = false;
@@ -168,9 +170,9 @@ LogChannelDWARF::Enable
}
if (flag_bits == 0)
flag_bits = DWARF_LOG_DEFAULT;
- m_log_sp->GetMask().Reset(flag_bits);
- m_log_sp->GetOptions().Reset(log_options);
- return m_log_sp.get() != NULL;
+ m_log_ap->GetMask().Reset(flag_bits);
+ m_log_ap->GetOptions().Reset(log_options);
+ return m_log_ap.get() != NULL;
}
void
@@ -188,35 +190,35 @@ LogChannelDWARF::ListCategories (Stream *strm)
SymbolFileDWARF::GetPluginNameStatic());
}
-LogSP
+Log *
LogChannelDWARF::GetLog ()
{
if (g_log_channel)
- return g_log_channel->m_log_sp;
+ return g_log_channel->m_log_ap.get();
- return LogSP();
+ return NULL;
}
-LogSP
+Log *
LogChannelDWARF::GetLogIfAll (uint32_t mask)
{
- if (g_log_channel && g_log_channel->m_log_sp)
+ if (g_log_channel && g_log_channel->m_log_ap.get())
{
- if (g_log_channel->m_log_sp->GetMask().AllSet(mask))
- return g_log_channel->m_log_sp;
+ if (g_log_channel->m_log_ap->GetMask().AllSet(mask))
+ return g_log_channel->m_log_ap.get();
}
- return LogSP();
+ return NULL;
}
-LogSP
+Log *
LogChannelDWARF::GetLogIfAny (uint32_t mask)
{
- if (g_log_channel && g_log_channel->m_log_sp)
+ if (g_log_channel && g_log_channel->m_log_ap.get())
{
- if (g_log_channel->m_log_sp->GetMask().AnySet(mask))
- return g_log_channel->m_log_sp;
+ if (g_log_channel->m_log_ap->GetMask().AnySet(mask))
+ return g_log_channel->m_log_ap.get();
}
- return LogSP();
+ return NULL;
}
void
@@ -224,10 +226,13 @@ LogChannelDWARF::LogIf (uint32_t mask, const char *format, ...)
{
if (g_log_channel)
{
- LogSP log_sp(g_log_channel->m_log_sp);
- va_list args;
- va_start (args, format);
- log_sp->VAPrintf (format, args);
- va_end (args);
+ Log *log = g_log_channel->m_log_ap.get();
+ if (log && log->GetMask().AnySet(mask))
+ {
+ va_list args;
+ va_start (args, format);
+ log->VAPrintf (format, args);
+ va_end (args);
+ }
}
}
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h b/lldb/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h
index 1f57f03e621..6a6375cc806 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h
@@ -76,13 +76,13 @@ public:
virtual void
ListCategories (lldb_private::Stream *strm);
- static lldb::LogSP
+ static lldb_private::Log *
GetLog ();
- static lldb::LogSP
+ static lldb_private::Log *
GetLogIfAll (uint32_t mask);
- static lldb::LogSP
+ static lldb_private::Log *
GetLogIfAny (uint32_t mask);
static void
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 6d4e89d110c..3c0624dd68c 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -2061,9 +2061,9 @@ SymbolFileDWARF::ResolveTypeUID (DWARFCompileUnit* cu, const DWARFDebugInfoEntry
{
if (die != NULL)
{
- LogSP log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_INFO));
+ Log *log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_INFO));
if (log)
- GetObjectFile()->GetModule()->LogMessage (log.get(),
+ GetObjectFile()->GetModule()->LogMessage (log,
"SymbolFileDWARF::ResolveTypeUID (die = 0x%8.8x) %s '%s'",
die->GetOffset(),
DW_TAG_value_to_name(die->Tag()),
@@ -2081,7 +2081,7 @@ SymbolFileDWARF::ResolveTypeUID (DWARFCompileUnit* cu, const DWARFDebugInfoEntry
{
// Get the type, which could be a forward declaration
if (log)
- GetObjectFile()->GetModule()->LogMessage (log.get(),
+ GetObjectFile()->GetModule()->LogMessage (log,
"SymbolFileDWARF::ResolveTypeUID (die = 0x%8.8x) %s '%s' resolve parent forward type for 0x%8.8x",
die->GetOffset(),
DW_TAG_value_to_name(die->Tag()),
@@ -2092,7 +2092,7 @@ SymbolFileDWARF::ResolveTypeUID (DWARFCompileUnit* cu, const DWARFDebugInfoEntry
// if (child_requires_parent_class_union_or_struct_to_be_completed(die->Tag()))
// {
// if (log)
-// GetObjectFile()->GetModule()->LogMessage (log.get(),
+// GetObjectFile()->GetModule()->LogMessage (log,
// "SymbolFileDWARF::ResolveTypeUID (die = 0x%8.8x) %s '%s' resolve parent full type for 0x%8.8x since die is a function",
// die->GetOffset(),
// DW_TAG_value_to_name(die->Tag()),
@@ -2156,10 +2156,10 @@ SymbolFileDWARF::ResolveClangOpaqueTypeDefinition (lldb::clang_type_t clang_type
const dw_tag_t tag = die->Tag();
- LogSP log (LogChannelDWARF::GetLogIfAny(DWARF_LOG_DEBUG_INFO|DWARF_LOG_TYPE_COMPLETION));
+ Log *log (LogChannelDWARF::GetLogIfAny(DWARF_LOG_DEBUG_INFO|DWARF_LOG_TYPE_COMPLETION));
if (log)
{
- GetObjectFile()->GetModule()->LogMessageVerboseBacktrace (log.get(),
+ GetObjectFile()->GetModule()->LogMessageVerboseBacktrace (log,
"0x%8.8" PRIx64 ": %s '%s' resolving forward declaration...",
MakeUserID(die->GetOffset()),
DW_TAG_value_to_name(tag),
@@ -2354,7 +2354,7 @@ SymbolFileDWARF::ResolveClangOpaqueTypeDefinition (lldb::clang_type_t clang_type
{
if (log)
{
- GetObjectFile()->GetModule()->LogMessage (log.get(),
+ GetObjectFile()->GetModule()->LogMessage (log,
"SymbolFileDWARF::ResolveClangOpaqueTypeDefinition (clang_type = %p) caching layout info for record_decl = %p, bit_size = %" PRIu64 ", alignment = %" PRIu64 ", field_offsets[%u], base_offsets[%u], vbase_offsets[%u])",
clang_type,
record_decl,
@@ -2369,7 +2369,7 @@ SymbolFileDWARF::ResolveClangOpaqueTypeDefinition (lldb::clang_type_t clang_type
llvm::DenseMap <const clang::FieldDecl *, uint64_t>::const_iterator pos, end = layout_info.field_offsets.end();
for (idx = 0, pos = layout_info.field_offsets.begin(); pos != end; ++pos, ++idx)
{
- GetObjectFile()->GetModule()->LogMessage (log.get(),
+ GetObjectFile()->GetModule()->LogMessage (log,
"SymbolFileDWARF::ResolveClangOpaqueTypeDefinition (clang_type = %p) field[%u] = { bit_offset=%u, name='%s' }",
clang_type,
idx,
@@ -2382,7 +2382,7 @@ SymbolFileDWARF::ResolveClangOpaqueTypeDefinition (lldb::clang_type_t clang_type
llvm::DenseMap <const clang::CXXRecordDecl *, clang::CharUnits>::const_iterator base_pos, base_end = layout_info.base_offsets.end();
for (idx = 0, base_pos = layout_info.base_offsets.begin(); base_pos != base_end; ++base_pos, ++idx)
{
- GetObjectFile()->GetModule()->LogMessage (log.get(),
+ GetObjectFile()->GetModule()->LogMessage (log,
"SymbolFileDWARF::ResolveClangOpaqueTypeDefinition (clang_type = %p) base[%u] = { byte_offset=%u, name='%s' }",
clang_type,
idx,
@@ -2394,7 +2394,7 @@ SymbolFileDWARF::ResolveClangOpaqueTypeDefinition (lldb::clang_type_t clang_type
llvm::DenseMap <const clang::CXXRecordDecl *, clang::CharUnits>::const_iterator vbase_pos, vbase_end = layout_info.vbase_offsets.end();
for (idx = 0, vbase_pos = layout_info.vbase_offsets.begin(); vbase_pos != vbase_end; ++vbase_pos, ++idx)
{
- GetObjectFile()->GetModule()->LogMessage (log.get(),
+ GetObjectFile()->GetModule()->LogMessage (log,
"SymbolFileDWARF::ResolveClangOpaqueTypeDefinition (clang_type = %p) vbase[%u] = { byte_offset=%u, name='%s' }",
clang_type,
idx,
@@ -2813,10 +2813,10 @@ SymbolFileDWARF::NamespaceDeclMatchesThisSymbolFile (const ClangNamespaceDecl *n
return true; // The ASTs match, return true
// The namespace AST was valid, and it does not match...
- LogSP log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS));
+ Log *log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS));
if (log)
- GetObjectFile()->GetModule()->LogMessage(log.get(), "Valid namespace does not match symbol file");
+ GetObjectFile()->GetModule()->LogMessage(log, "Valid namespace does not match symbol file");
return false;
}
@@ -2830,7 +2830,7 @@ SymbolFileDWARF::DIEIsInNamespace (const ClangNamespaceDecl *namespace_decl,
if (namespace_decl == NULL)
return true;
- LogSP log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS));
+ Log *log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS));
const DWARFDebugInfoEntry *decl_ctx_die = NULL;
clang::DeclContext *die_clang_decl_ctx = GetClangDeclContextContainingDIE (cu, die, &decl_ctx_die);
@@ -2843,7 +2843,7 @@ SymbolFileDWARF::DIEIsInNamespace (const ClangNamespaceDecl *namespace_decl,
if (decl_ctx_die->Tag() != DW_TAG_namespace)
{
if (log)
- GetObjectFile()->GetModule()->LogMessage(log.get(), "Found a match, but its parent is not a namespace");
+ GetObjectFile()->GetModule()->LogMessage(log, "Found a match, but its parent is not a namespace");
return false;
}
@@ -2864,18 +2864,18 @@ SymbolFileDWARF::DIEIsInNamespace (const ClangNamespaceDecl *namespace_decl,
}
if (log)
- GetObjectFile()->GetModule()->LogMessage(log.get(), "Found a match, but its parent doesn't exist");
+ GetObjectFile()->GetModule()->LogMessage(log, "Found a match, but its parent doesn't exist");
return false;
}
uint32_t
SymbolFileDWARF::FindGlobalVariables (const ConstString &name, const lldb_private::ClangNamespaceDecl *namespace_decl, bool append, uint32_t max_matches, VariableList& variables)
{
- LogSP log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS));
+ Log *log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS));
if (log)
{
- GetObjectFile()->GetModule()->LogMessage (log.get(),
+ GetObjectFile()->GetModule()->LogMessage (log,
"SymbolFileDWARF::FindGlobalVariables (name=\"%s\", namespace_decl=%p, append=%u, max_matches=%u, variables)",
name.GetCString(),
namespace_decl,
@@ -2980,7 +2980,7 @@ SymbolFileDWARF::FindGlobalVariables (const ConstString &name, const lldb_privat
const uint32_t num_matches = variables.GetSize() - original_size;
if (log && num_matches > 0)
{
- GetObjectFile()->GetModule()->LogMessage (log.get(),
+ GetObjectFile()->GetModule()->LogMessage (log,
"SymbolFileDWARF::FindGlobalVariables (name=\"%s\", namespace_decl=%p, append=%u, max_matches=%u, variables) => %u",
name.GetCString(),
namespace_decl,
@@ -2994,11 +2994,11 @@ SymbolFileDWARF::FindGlobalVariables (const ConstString &name, const lldb_privat
uint32_t
SymbolFileDWARF::FindGlobalVariables(const RegularExpression& regex, bool append, uint32_t max_matches, VariableList& variables)
{
- LogSP log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS));
+ Log *log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS));
if (log)
{
- GetObjectFile()->GetModule()->LogMessage (log.get(),
+ GetObjectFile()->GetModule()->LogMessage (log,
"SymbolFileDWARF::FindGlobalVariables (regex=\"%s\", append=%u, max_matches=%u, variables)",
regex.GetText(),
append,
@@ -3322,11 +3322,11 @@ SymbolFileDWARF::FindFunctions (const ConstString &name,
"SymbolFileDWARF::FindFunctions (name = '%s')",
name.AsCString());
- LogSP log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS));
+ Log *log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS));
if (log)
{
- GetObjectFile()->GetModule()->LogMessage (log.get(),
+ GetObjectFile()->GetModule()->LogMessage (log,
"SymbolFileDWARF::FindFunctions (name=\"%s\", name_type_mask=0x%x, append=%u, sc_list)",
name.GetCString(),
name_type_mask,
@@ -3607,7 +3607,7 @@ SymbolFileDWARF::FindFunctions (const ConstString &name,
if (log && num_matches > 0)
{
- GetObjectFile()->GetModule()->LogMessage (log.get(),
+ GetObjectFile()->GetModule()->LogMessage (log,
"SymbolFileDWARF::FindFunctions (name=\"%s\", name_type_mask=0x%x, append=%u, sc_list) => %u",
name.GetCString(),
name_type_mask,
@@ -3624,11 +3624,11 @@ SymbolFileDWARF::FindFunctions(const RegularExpression& regex, bool include_inli
"SymbolFileDWARF::FindFunctions (regex = '%s')",
regex.GetText());
- LogSP log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS));
+ Log *log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS));
if (log)
{
- GetObjectFile()->GetModule()->LogMessage (log.get(),
+ GetObjectFile()->GetModule()->LogMessage (log,
"SymbolFileDWARF::FindFunctions (regex=\"%s\", append=%u, sc_list)",
regex.GetText(),
append);
@@ -3675,13 +3675,13 @@ SymbolFileDWARF::FindTypes (const SymbolContext& sc,
if (info == NULL)
return 0;
- LogSP log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS));
+ Log *log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS));
if (log)
{
if (namespace_decl)
{
- GetObjectFile()->GetModule()->LogMessage (log.get(),
+ GetObjectFile()->GetModule()->LogMessage (log,
"SymbolFileDWARF::FindTypes (sc, name=\"%s\", clang::NamespaceDecl(%p) \"%s\", append=%u, max_matches=%u, type_list)",
name.GetCString(),
namespace_decl->GetNamespaceDecl(),
@@ -3691,7 +3691,7 @@ SymbolFileDWARF::FindTypes (const SymbolContext& sc,
}
else
{
- GetObjectFile()->GetModule()->LogMessage (log.get(),
+ GetObjectFile()->GetModule()->LogMessage (log,
"SymbolFileDWARF::FindTypes (sc, name=\"%s\", clang::NamespaceDecl(NULL), append=%u, max_matches=%u, type_list)",
name.GetCString(),
append,
@@ -3766,7 +3766,7 @@ SymbolFileDWARF::FindTypes (const SymbolContext& sc,
{
if (namespace_decl)
{
- GetObjectFile()->GetModule()->LogMessage (log.get(),
+ GetObjectFile()->GetModule()->LogMessage (log,
"SymbolFileDWARF::FindTypes (sc, name=\"%s\", clang::NamespaceDecl(%p) \"%s\", append=%u, max_matches=%u, type_list) => %u",
name.GetCString(),
namespace_decl->GetNamespaceDecl(),
@@ -3777,7 +3777,7 @@ SymbolFileDWARF::FindTypes (const SymbolContext& sc,
}
else
{
- GetObjectFile()->GetModule()->LogMessage (log.get(),
+ GetObjectFile()->GetModule()->LogMessage (log,
"SymbolFileDWARF::FindTypes (sc, name=\"%s\", clang::NamespaceDecl(NULL), append=%u, max_matches=%u, type_list) => %u",
name.GetCString(),
append,
@@ -3796,11 +3796,11 @@ SymbolFileDWARF::FindNamespace (const SymbolContext& sc,
const ConstString &name,
const lldb_private::ClangNamespaceDecl *parent_namespace_decl)
{
- LogSP log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS));
+ Log *log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS));
if (log)
{
- GetObjectFile()->GetModule()->LogMessage (log.get(),
+ GetObjectFile()->GetModule()->LogMessage (log,
"SymbolFileDWARF::FindNamespace (sc, name=\"%s\")",
name.GetCString());
}
@@ -3870,7 +3870,7 @@ SymbolFileDWARF::FindNamespace (const SymbolContext& sc,
}
if (log && namespace_decl.GetNamespaceDecl())
{
- GetObjectFile()->GetModule()->LogMessage (log.get(),
+ GetObjectFile()->GetModule()->LogMessage (log,
"SymbolFileDWARF::FindNamespace (sc, name=\"%s\") => clang::NamespaceDecl(%p) \"%s\"",
name.GetCString(),
namespace_decl.GetNamespaceDecl(),
@@ -4324,12 +4324,12 @@ SymbolFileDWARF::ResolveNamespaceDIE (DWARFCompileUnit *dwarf_cu, const DWARFDeb
const char *namespace_name = die->GetAttributeValueAsString(this, dwarf_cu, DW_AT_name, NULL);
clang::DeclContext *containing_decl_ctx = GetClangDeclContextContainingDIE (dwarf_cu, die, NULL);
namespace_decl = GetClangASTContext().GetUniqueNamespaceDeclaration (namespace_name, containing_decl_ctx);
- LogSP log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_INFO));
+ Log *log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_INFO));
if (log)
{
if (namespace_name)
{
- GetObjectFile()->GetModule()->LogMessage (log.get(),
+ GetObjectFile()->GetModule()->LogMessage (log,
"ASTContext => %p: 0x%8.8" PRIx64 ": DW_TAG_namespace with DW_AT_name(\"%s\") => clang::NamespaceDecl *%p (original = %p)",
GetClangASTContext().getASTContext(),
MakeUserID(die->GetOffset()),
@@ -4339,7 +4339,7 @@ SymbolFileDWARF::ResolveNamespaceDIE (DWARFCompileUnit *dwarf_cu, const DWARFDeb
}
else
{
- GetObjectFile()->GetModule()->LogMessage (log.get(),
+ GetObjectFile()->GetModule()->LogMessage (log,
"ASTContext => %p: 0x%8.8" PRIx64 ": DW_TAG_namespace (anonymous) => clang::NamespaceDecl *%p (original = %p)",
GetClangASTContext().getASTContext(),
MakeUserID(die->GetOffset()),
@@ -4372,9 +4372,9 @@ SymbolFileDWARF::GetClangDeclContextForDIE (const SymbolContext &sc, DWARFCompil
if (die_offset != DW_INVALID_OFFSET)
return GetClangDeclContextForDIEOffset (sc, die_offset);
- LogSP log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_INFO));
+ Log *log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_INFO));
if (log)
- GetObjectFile()->GetModule()->LogMessage(log.get(), "SymbolFileDWARF::GetClangDeclContextForDIE (die = 0x%8.8x) %s '%s'", die->GetOffset(), DW_TAG_value_to_name(die->Tag()), die->GetName(this, cu));
+ GetObjectFile()->GetModule()->LogMessage(log, "SymbolFileDWARF::GetClangDeclContextForDIE (die = 0x%8.8x) %s '%s'", die->GetOffset(), DW_TAG_value_to_name(die->Tag()), die->GetName(this, cu));
// This is the DIE we want. Parse it, then query our map.
bool assert_not_being_parsed = true;
ResolveTypeUID (cu, die, assert_not_being_parsed);
@@ -4769,11 +4769,11 @@ SymbolFileDWARF::FindDefinitionTypeForDIE (DWARFCompileUnit* cu,
std::string qualified_name;
- LogSP log (LogChannelDWARF::GetLogIfAny(DWARF_LOG_TYPE_COMPLETION|DWARF_LOG_LOOKUPS));
+ Log *log (LogChannelDWARF::GetLogIfAny(DWARF_LOG_TYPE_COMPLETION|DWARF_LOG_LOOKUPS));
if (log)
{
die->GetQualifiedName(this, cu, qualified_name);
- GetObjectFile()->GetModule()->LogMessage (log.get(),
+ GetObjectFile()->GetModule()->LogMessage (log,
"SymbolFileDWARF::FindDefinitionTypeForDIE(die=0x%8.8x (%s), name='%s')",
die->GetOffset(),
qualified_name.c_str(),
@@ -4795,13 +4795,13 @@ SymbolFileDWARF::FindDefinitionTypeForDIE (DWARFCompileUnit* cu,
const uint32_t qualified_name_hash = MappedHash::HashStringUsingDJB (qualified_name.c_str());
if (log)
- GetObjectFile()->GetModule()->LogMessage (log.get(),"FindByNameAndTagAndQualifiedNameHash()");
+ GetObjectFile()->GetModule()->LogMessage (log,"FindByNameAndTagAndQualifiedNameHash()");
m_apple_types_ap->FindByNameAndTagAndQualifiedNameHash (type_name.GetCString(), die->Tag(), qualified_name_hash, die_offsets);
}
else if (has_tag > 1)
{
if (log)
- GetObjectFile()->GetModule()->LogMessage (log.get(),"FindByNameAndTag()");
+ GetObjectFile()->GetModule()->LogMessage (log,"FindByNameAndTag()");
m_apple_types_ap->FindByNameAndTag (type_name.GetCString(), die->Tag(), die_offsets);
}
else
@@ -4876,7 +4876,7 @@ SymbolFileDWARF::FindDefinitionTypeForDIE (DWARFCompileUnit* cu,
{
std::string qualified_name;
type_die->GetQualifiedName(this, cu, qualified_name);
- GetObjectFile()->GetModule()->LogMessage (log.get(),
+ GetObjectFile()->GetModule()->LogMessage (log,
"SymbolFileDWARF::FindDefinitionTypeForDIE(die=0x%8.8x, name='%s') trying die=0x%8.8x (%s)",
die->GetOffset(),
type_name.GetCString(),
@@ -4909,7 +4909,7 @@ SymbolFileDWARF::FindDefinitionTypeForDIE (DWARFCompileUnit* cu,
{
std::string qualified_name;
type_die->GetQualifiedName(this, cu, qualified_name);
- GetObjectFile()->GetModule()->LogMessage (log.get(),
+ GetObjectFile()->GetModule()->LogMessage (log,
"SymbolFileDWARF::FindDefinitionTypeForDIE(die=0x%8.8x, name='%s') ignoring die=0x%8.8x (%s)",
die->GetOffset(),
type_name.GetCString(),
@@ -4945,10 +4945,10 @@ SymbolFileDWARF::FindDefinitionTypeForDWARFDeclContext (const DWARFDeclContext &
if (type_name)
{
- LogSP log (LogChannelDWARF::GetLogIfAny(DWARF_LOG_TYPE_COMPLETION|DWARF_LOG_LOOKUPS));
+ Log *log (LogChannelDWARF::GetLogIfAny(DWARF_LOG_TYPE_COMPLETION|DWARF_LOG_LOOKUPS));
if (log)
{
- GetObjectFile()->GetModule()->LogMessage (log.get(),
+ GetObjectFile()->GetModule()->LogMessage (log,
"SymbolFileDWARF::FindDefinitionTypeForDWARFDeclContext(tag=%s, qualified-name='%s')",
DW_TAG_value_to_name(dwarf_decl_ctx[0].tag),
dwarf_decl_ctx.GetQualifiedName());
@@ -4967,13 +4967,13 @@ SymbolFileDWARF::FindDefinitionTypeForDWARFDeclContext (const DWARFDeclContext &
const char *qualified_name = dwarf_decl_ctx.GetQualifiedName();
const uint32_t qualified_name_hash = MappedHash::HashStringUsingDJB (qualified_name);
if (log)
- GetObjectFile()->GetModule()->LogMessage (log.get(),"FindByNameAndTagAndQualifiedNameHash()");
+ GetObjectFile()->GetModule()->LogMessage (log,"FindByNameAndTagAndQualifiedNameHash()");
m_apple_types_ap->FindByNameAndTagAndQualifiedNameHash (type_name.GetCString(), tag, qualified_name_hash, die_offsets);
}
else if (has_tag)
{
if (log)
- GetObjectFile()->GetModule()->LogMessage (log.get(),"FindByNameAndTag()");
+ GetObjectFile()->GetModule()->LogMessage (log,"FindByNameAndTag()");
m_apple_types_ap->FindByNameAndTag (type_name.GetCString(), tag, die_offsets);
}
else
@@ -5045,7 +5045,7 @@ SymbolFileDWARF::FindDefinitionTypeForDWARFDeclContext (const DWARFDeclContext &
if (log)
{
- GetObjectFile()->GetModule()->LogMessage (log.get(),
+ GetObjectFile()->GetModule()->LogMessage (log,
"SymbolFileDWARF::FindDefinitionTypeForDWARFDeclContext(tag=%s, qualified-name='%s') trying die=0x%8.8x (%s)",
DW_TAG_value_to_name(dwarf_decl_ctx[0].tag),
dwarf_decl_ctx.GetQualifiedName(),
@@ -5070,7 +5070,7 @@ SymbolFileDWARF::FindDefinitionTypeForDWARFDeclContext (const DWARFDeclContext &
{
std::string qualified_name;
type_die->GetQualifiedName(this, type_cu, qualified_name);
- GetObjectFile()->GetModule()->LogMessage (log.get(),
+ GetObjectFile()->GetModule()->LogMessage (log,
"SymbolFileDWARF::FindDefinitionTypeForDWARFDeclContext(tag=%s, qualified-name='%s') ignoring die=0x%8.8x (%s)",
DW_TAG_value_to_name(dwarf_decl_ctx[0].tag),
dwarf_decl_ctx.GetQualifiedName(),
@@ -5166,7 +5166,7 @@ SymbolFileDWARF::CopyUniqueClassMethodTypes (SymbolFileDWARF *src_symfile,
}
const uint32_t src_size = src_name_to_die.GetSize ();
const uint32_t dst_size = dst_name_to_die.GetSize ();
- LogSP log (LogChannelDWARF::GetLogIfAny(DWARF_LOG_DEBUG_INFO | DWARF_LOG_TYPE_COMPLETION));
+ Log *log (LogChannelDWARF::GetLogIfAny(DWARF_LOG_DEBUG_INFO | DWARF_LOG_TYPE_COMPLETION));
// Is everything kosher so we can go through the members at top speed?
bool fast_path = true;
@@ -5399,13 +5399,13 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
AccessType accessibility = eAccessNone;
if (die != NULL)
{
- LogSP log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_INFO));
+ Log *log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_INFO));
if (log)
{
const DWARFDebugInfoEntry *context_die;
clang::DeclContext *context = GetClangDeclContextContainingDIE (dwarf_cu, die, &context_die);
- GetObjectFile()->GetModule()->LogMessage (log.get(), "SymbolFileDWARF::ParseType (die = 0x%8.8x, decl_ctx = %p (die 0x%8.8x)) %s name = '%s')",
+ GetObjectFile()->GetModule()->LogMessage (log, "SymbolFileDWARF::ParseType (die = 0x%8.8x, decl_ctx = %p (die 0x%8.8x)) %s name = '%s')",
die->GetOffset(),
context,
context_die->GetOffset(),
@@ -5414,16 +5414,16 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
#if defined(LLDB_CONFIGURATION_DEBUG) or defined(LLDB_CONFIGURATION_RELEASE)
scoped_die_logger.Push (dwarf_cu, die);
- g_die_stack.LogDIEs(log.get(), this);
+ g_die_stack.LogDIEs(log, this);
#endif
}
//
-// LogSP log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_INFO));
+// Log *log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_INFO));
// if (log && dwarf_cu)
// {
// StreamString s;
// die->DumpLocation (this, dwarf_cu, s);
-// GetObjectFile()->GetModule()->LogMessage (log.get(), "SymbolFileDwarf::%s %s", __FUNCTION__, s.GetData());
+// GetObjectFile()->GetModule()->LogMessage (log, "SymbolFileDwarf::%s %s", __FUNCTION__, s.GetData());
//
// }
@@ -5554,7 +5554,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
if (type_name_const_str == g_objc_type_name_id)
{
if (log)
- GetObjectFile()->GetModule()->LogMessage (log.get(), "SymbolFileDWARF::ParseType (die = 0x%8.8x) %s '%s' is Objective C 'id' built-in type.",
+ GetObjectFile()->GetModule()->LogMessage (log, "SymbolFileDWARF::ParseType (die = 0x%8.8x) %s '%s' is Objective C 'id' built-in type.",
die->GetOffset(),
DW_TAG_value_to_name(die->Tag()),
die->GetName(this, dwarf_cu));
@@ -5567,7 +5567,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
else if (type_name_const_str == g_objc_type_name_Class)
{
if (log)
- GetObjectFile()->GetModule()->LogMessage (log.get(), "SymbolFileDWARF::ParseType (die = 0x%8.8x) %s '%s' is Objective C 'Class' built-in type.",
+ GetObjectFile()->GetModule()->LogMessage (log, "SymbolFileDWARF::ParseType (die = 0x%8.8x) %s '%s' is Objective C 'Class' built-in type.",
die->GetOffset(),
DW_TAG_value_to_name(die->Tag()),
die->GetName(this, dwarf_cu));
@@ -5579,7 +5579,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
else if (type_name_const_str == g_objc_type_name_selector)
{
if (log)
- GetObjectFile()->GetModule()->LogMessage (log.get(), "SymbolFileDWARF::ParseType (die = 0x%8.8x) %s '%s' is Objective C 'selector' built-in type.",
+ GetObjectFile()->GetModule()->LogMessage (log, "SymbolFileDWARF::ParseType (die = 0x%8.8x) %s '%s' is Objective C 'selector' built-in type.",
die->GetOffset(),
DW_TAG_value_to_name(die->Tag()),
die->GetName(this, dwarf_cu));
@@ -5602,7 +5602,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
if (!strcmp(struct_name, "objc_object"))
{
if (log)
- GetObjectFile()->GetModule()->LogMessage (log.get(), "SymbolFileDWARF::ParseType (die = 0x%8.8x) %s '%s' is 'objc_object*', which we overrode to 'id'.",
+ GetObjectFile()->GetModule()->LogMessage (log, "SymbolFileDWARF::ParseType (die = 0x%8.8x) %s '%s' is 'objc_object*', which we overrode to 'id'.",
die->GetOffset(),
DW_TAG_value_to_name(die->Tag()),
die->GetName(this, dwarf_cu));
@@ -5811,7 +5811,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
{
if (log)
{
- GetObjectFile()->GetModule()->LogMessage (log.get(),
+ GetObjectFile()->GetModule()->LogMessage (log,
"SymbolFileDWARF(%p) - 0x%8.8x: %s type \"%s\" is an incomplete objc type, complete type is 0x%8.8" PRIx64,
this,
die->GetOffset(),
@@ -5839,7 +5839,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
// DWARF. If this fails, we need to look elsewhere...
if (log)
{
- GetObjectFile()->GetModule()->LogMessage (log.get(),
+ GetObjectFile()->GetModule()->LogMessage (log,
"SymbolFileDWARF(%p) - 0x%8.8x: %s type \"%s\" is a forward declaration, trying to find complete type",
this,
die->GetOffset(),
@@ -5865,7 +5865,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
{
if (log)
{
- GetObjectFile()->GetModule()->LogMessage (log.get(),
+ GetObjectFile()->GetModule()->LogMessage (log,
"SymbolFileDWARF(%p) - 0x%8.8x: %s type \"%s\" is a forward declaration, complete type is 0x%8.8" PRIx64,
this,
die->GetOffset(),
@@ -7682,7 +7682,7 @@ SymbolFileDWARF::LayoutRecordType (const clang::RecordDecl *record_decl,
llvm::DenseMap <const clang::CXXRecordDecl *, clang::CharUnits> &base_offsets,
llvm::DenseMap <const clang::CXXRecordDecl *, clang::CharUnits> &vbase_offsets)
{
- LogSP log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_INFO));
+ Log *log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_INFO));
RecordDeclToLayoutMap::iterator pos = m_record_decl_to_layout_map.find (record_decl);
bool success = false;
base_offsets.clear();
@@ -7705,7 +7705,7 @@ SymbolFileDWARF::LayoutRecordType (const clang::RecordDecl *record_decl,
}
if (log)
- GetObjectFile()->GetModule()->LogMessage (log.get(),
+ GetObjectFile()->GetModule()->LogMessage (log,
"SymbolFileDWARF::LayoutRecordType (record_decl = %p, bit_size = %" PRIu64 ", alignment = %" PRIu64 ", field_offsets[%u],base_offsets[%u], vbase_offsets[%u]) success = %i",
record_decl,
bit_size,
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
index 521e4fe57b8..096b5fc0717 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
@@ -55,7 +55,7 @@ SymbolFileDWARFDebugMap::CompileUnitInfo::GetFileRangeMap(SymbolFileDWARFDebugMa
ObjectFile *oso_objfile = oso_module->GetObjectFile();
- LogSP log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_MAP));
+ Log *log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_MAP));
if (log)
{
ConstString object_name (oso_module->GetObjectName());
@@ -330,7 +330,7 @@ SymbolFileDWARFDebugMap::InitOSO()
Symtab* symtab = m_obj_file->GetSymtab();
if (symtab)
{
- LogSP log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_MAP));
+ Log *log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_MAP));
std::vector<uint32_t> oso_indexes;
// When a mach-o symbol is encoded, the n_type field is encoded in bits
diff --git a/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp b/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
index 8f9217231f4..55eb7037192 100644
--- a/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
+++ b/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
@@ -59,7 +59,7 @@ UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly (AddressRange&
exe_ctx,
range));
- LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_UNWIND));
+ Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_UNWIND));
if (disasm_sp)
{
@@ -397,7 +397,7 @@ UnwindAssemblyInstEmulation::ReadMemory (EmulateInstruction *instruction,
void *dst,
size_t dst_len)
{
- LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_UNWIND));
+ Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_UNWIND));
if (log && log->GetVerbose ())
{
@@ -438,7 +438,7 @@ UnwindAssemblyInstEmulation::WriteMemory (EmulateInstruction *instruction,
instruction->GetArchitecture ().GetByteOrder(),
instruction->GetArchitecture ().GetAddressByteSize());
- LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_UNWIND));
+ Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_UNWIND));
if (log && log->GetVerbose ())
{
@@ -545,7 +545,7 @@ UnwindAssemblyInstEmulation::ReadRegister (EmulateInstruction *instruction,
{
bool synthetic = GetRegisterValue (*reg_info, reg_value);
- LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_UNWIND));
+ Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_UNWIND));
if (log && log->GetVerbose ())
{
@@ -575,7 +575,7 @@ UnwindAssemblyInstEmulation::WriteRegister (EmulateInstruction *instruction,
const RegisterInfo *reg_info,
const RegisterValue &reg_value)
{
- LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_UNWIND));
+ Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_UNWIND));
if (log && log->GetVerbose ())
{
OpenPOWER on IntegriCloud