summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2015-07-25 02:39:42 +0000
committerJason Molenda <jmolenda@apple.com>2015-07-25 02:39:42 +0000
commit08a3258bd839041bc8e6ef974b46fc784e93504b (patch)
treeed7dcb62771ebd16f09f0c0e3ae731fcfa42c95a /lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
parenta265b01353673e544e2236bd7f3ed5d5fc20657a (diff)
downloadbcm5719-llvm-08a3258bd839041bc8e6ef974b46fc784e93504b.tar.gz
bcm5719-llvm-08a3258bd839041bc8e6ef974b46fc784e93504b.zip
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
Diffstat (limited to 'lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp')
-rw-r--r--lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp10
1 files changed, 10 insertions, 0 deletions
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());
OpenPOWER on IntegriCloud