summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2019-03-06 23:47:52 +0000
committerJason Molenda <jmolenda@apple.com>2019-03-06 23:47:52 +0000
commit2d6e6cbacc720d23100edbb4e48dacbe792259c7 (patch)
tree14ba99c67ed5494eb0f2a04ac88fcb5a3ac4702c /lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
parent212c8ac23f4f3313c847eb42cac1088cc4c3d39f (diff)
downloadbcm5719-llvm-2d6e6cbacc720d23100edbb4e48dacbe792259c7.tar.gz
bcm5719-llvm-2d6e6cbacc720d23100edbb4e48dacbe792259c7.zip
Remove the warning in
DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule which would list every kext that failed to load when doing kernel debugging. Instead, in DynamicLoaderDarwinKernel::ParseKextSummaries, print a summary of how many kexts lldb was unable to load at the end. I want to reduce the amount of output at the start of kernel debug sessions a bit; we'll see if anyone really wanted to see the list of which kexts specifically were unable to be loaded. No functional change, only changing lldb's output at the start of a kernel debug session. <rdar://problem/48654569> llvm-svn: 355565
Diffstat (limited to 'lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp')
-rw-r--r--lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
index bae481a031b..f719878bd94 100644
--- a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
+++ b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
@@ -873,14 +873,6 @@ bool DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(
}
}
- if (!m_module_sp && !IsKernel() && m_uuid.IsValid() && !m_name.empty()) {
- Stream *s = target.GetDebugger().GetOutputFile().get();
- if (s) {
- s->Printf("warning: Can't find binary/dSYM for %s (%s)\n", m_name.c_str(),
- m_uuid.GetAsString().c_str());
- }
- }
-
static ConstString g_section_name_LINKEDIT("__LINKEDIT");
if (m_memory_module_sp && m_module_sp) {
@@ -1296,6 +1288,7 @@ bool DynamicLoaderDarwinKernel::ParseKextSummaries(
}
}
+ int failed_to_load_kexts = 0;
if (number_of_new_kexts_being_added > 0) {
ModuleList loaded_module_list;
@@ -1305,6 +1298,7 @@ bool DynamicLoaderDarwinKernel::ParseKextSummaries(
KextImageInfo &image_info = kext_summaries[new_kext];
if (load_kexts) {
if (!image_info.LoadImageUsingMemoryModule(m_process)) {
+ failed_to_load_kexts++;
image_info.LoadImageAtFileAddress(m_process);
}
}
@@ -1350,7 +1344,11 @@ bool DynamicLoaderDarwinKernel::ParseKextSummaries(
}
if (s && load_kexts) {
- s->Printf(" done.\n");
+ s->Printf(" done.");
+ if (failed_to_load_kexts > 0 && number_of_new_kexts_being_added > 0)
+ s->Printf(" Failed to load %d of %d kexts.", failed_to_load_kexts,
+ number_of_new_kexts_being_added);
+ s->Printf("\n");
s->Flush();
}
OpenPOWER on IntegriCloud