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
diff --git a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
index bec5ca4..086d641 100644
--- a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
+++ b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
@@ -668,6 +668,7 @@
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 @@
{
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 @@
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());