summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2017-02-28 18:57:54 +0000
committerJim Ingham <jingham@apple.com>2017-02-28 18:57:54 +0000
commit519b0816c6d9be5475cd99fcb994f30d96c1bcc8 (patch)
treee0543a1f4f9cbcfcf25e55103ea2954f830ae1a2 /lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
parentb691ccf0a5e59e285d87b51946b9dee144d74a96 (diff)
downloadbcm5719-llvm-519b0816c6d9be5475cd99fcb994f30d96c1bcc8.tar.gz
bcm5719-llvm-519b0816c6d9be5475cd99fcb994f30d96c1bcc8.zip
Fix a bug in r294611 w.r.t. Darwin Kernel debugging.
<rdar://problem/30735021> llvm-svn: 296504
Diffstat (limited to 'lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp')
-rw-r--r--lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
index b7010303bca..255210b756e 100644
--- a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
+++ b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
@@ -25,6 +25,7 @@
#include "lldb/Host/Symbols.h"
#include "lldb/Interpreter/OptionValueProperties.h"
#include "lldb/Symbol/ObjectFile.h"
+#include "lldb/Target/OperatingSystem.h"
#include "lldb/Target/RegisterContext.h"
#include "lldb/Target/StackFrame.h"
#include "lldb/Target/Target.h"
@@ -1026,6 +1027,12 @@ void DynamicLoaderDarwinKernel::LoadKernelModuleIfNeeded() {
m_kernel.LoadImageAtFileAddress(m_process);
}
}
+
+ // The operating system plugin gets loaded and initialized in
+ // LoadImageUsingMemoryModule when we discover the kernel dSYM. For a
+ // core file in particular, that's the wrong place to do this, since
+ // we haven't fixed up the section addresses yet. So let's redo it here.
+ LoadOperatingSystemPlugin(false);
if (m_kernel.IsLoaded() && m_kernel.GetModule()) {
static ConstString kext_summary_symbol("gLoadedKextSummaries");
OpenPOWER on IntegriCloud