From a8cb765cf45b6bdf8a76828c7882cecf2d3d5034 Mon Sep 17 00:00:00 2001 From: Jason Molenda Date: Thu, 28 Jul 2016 04:18:44 +0000 Subject: Add some logging to the kernel dynamicloader plugin when we fail to read a kext binary from memory. llvm-svn: 276954 --- .../Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp | 3 +++ 1 file changed, 3 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 6fcec3d09f6..18c8602c41e 100644 --- a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp +++ b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp @@ -774,6 +774,9 @@ DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule (Process *p // have the correct segment load addresses. if (!ReadMemoryModule (process)) { + Log *log(GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER)); + if (log) + log->Printf("Unable to read '%s' from memory at address 0x%" PRIx64 " to get the segment load addresses.", m_name.c_str(), m_load_address); return false; } -- cgit v1.2.3