From 08a3258bd839041bc8e6ef974b46fc784e93504b Mon Sep 17 00:00:00 2001 From: Jason Molenda Date: Sat, 25 Jul 2015 02:39:42 +0000 Subject: Add some initial logging for when lldb is searching for binaries, dSYMs, or reading binaries out of memory to the 'Host' log channel. There's more to be done here, both for Mac and for other platforms, but the initial set of new loggings are useful enough to check in at this point. llvm-svn: 243200 --- .../DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp') diff --git a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp index bec5ca4098e..086d641b8d2 100644 --- a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp +++ b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp @@ -668,6 +668,7 @@ DynamicLoaderDarwinKernel::KextImageInfo::GetUUID () const bool DynamicLoaderDarwinKernel::KextImageInfo::ReadMemoryModule (Process *process) { + Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST); if (m_memory_module_sp.get() != NULL) return true; if (m_load_address == LLDB_INVALID_ADDRESS) @@ -702,6 +703,10 @@ DynamicLoaderDarwinKernel::KextImageInfo::ReadMemoryModule (Process *process) { if (m_uuid != memory_module_sp->GetUUID()) { + if (log) + { + log->Printf ("KextImageInfo::ReadMemoryModule the kernel said to find uuid %s at 0x%" PRIx64 " but instead we found uuid %s, throwing it away", m_uuid.GetAsString().c_str(), m_load_address, memory_module_sp->GetUUID().GetAsString().c_str()); + } return false; } } @@ -716,6 +721,11 @@ DynamicLoaderDarwinKernel::KextImageInfo::ReadMemoryModule (Process *process) m_kernel_image = is_kernel; if (is_kernel) { + if (log) + { + // This is unusual and probably not intended + log->Printf ("KextImageInfo::ReadMemoryModule read the kernel binary out of memory"); + } if (memory_module_sp->GetArchitecture().IsValid()) { process->GetTarget().SetArchitecture(memory_module_sp->GetArchitecture()); -- cgit v1.2.3