diff options
Diffstat (limited to 'source/Plugins/DynamicLoader/Darwin-Kernel')
3 files changed, 23 insertions, 6 deletions
diff --git a/source/Plugins/DynamicLoader/Darwin-Kernel/CMakeLists.txt b/source/Plugins/DynamicLoader/Darwin-Kernel/CMakeLists.txt index 02752b78a4c7..ffc797b7475b 100644 --- a/source/Plugins/DynamicLoader/Darwin-Kernel/CMakeLists.txt +++ b/source/Plugins/DynamicLoader/Darwin-Kernel/CMakeLists.txt @@ -1,3 +1,13 @@ -add_lldb_library(lldbPluginDynamicLoaderDarwinKernel +add_lldb_library(lldbPluginDynamicLoaderDarwinKernel PLUGIN DynamicLoaderDarwinKernel.cpp + + LINK_LIBS + lldbBreakpoint + lldbCore + lldbHost + lldbInterpreter + lldbSymbol + lldbTarget + lldbUtility + lldbPluginPlatformMacOSX ) diff --git a/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp b/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp index b7010303bcaa..80f3f6857fd4 100644 --- a/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp +++ b/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp @@ -12,10 +12,7 @@ #include "Plugins/Platform/MacOSX/PlatformDarwinKernel.h" #include "lldb/Breakpoint/StoppointCallbackContext.h" -#include "lldb/Core/DataBuffer.h" -#include "lldb/Core/DataBufferHeap.h" #include "lldb/Core/Debugger.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/PluginManager.h" @@ -25,11 +22,15 @@ #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" #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadPlanRunToAddress.h" +#include "lldb/Utility/DataBuffer.h" +#include "lldb/Utility/DataBufferHeap.h" +#include "lldb/Utility/Log.h" #include "DynamicLoaderDarwinKernel.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"); diff --git a/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h b/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h index 695a4eaf881a..7ca9bada1a1f 100644 --- a/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h +++ b/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h @@ -18,10 +18,10 @@ // Other libraries and framework includes // Project includes -#include "lldb/Core/UUID.h" -#include "lldb/Host/FileSpec.h" #include "lldb/Target/DynamicLoader.h" #include "lldb/Target/Process.h" +#include "lldb/Utility/FileSpec.h" +#include "lldb/Utility/UUID.h" class DynamicLoaderDarwinKernel : public lldb_private::DynamicLoader { public: |