diff options
Diffstat (limited to 'lldb/source')
-rw-r--r-- | lldb/source/Core/DynamicLoader.cpp | 7 | ||||
-rw-r--r-- | lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/lldb/source/Core/DynamicLoader.cpp b/lldb/source/Core/DynamicLoader.cpp index 69c5ea30dad..667cf7c8668 100644 --- a/lldb/source/Core/DynamicLoader.cpp +++ b/lldb/source/Core/DynamicLoader.cpp @@ -233,3 +233,10 @@ addr_t DynamicLoader::ReadPointer(addr_t addr) { else return value; } + +void DynamicLoader::LoadOperatingSystemPlugin(bool flush) +{ + if (m_process) + m_process->LoadOperatingSystemPlugin(flush); +} + 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"); |