summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp')
-rw-r--r--lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
index 247eb1695e7..667c9d7e13c 100644
--- a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
+++ b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
@@ -188,7 +188,14 @@ DynamicLoaderDarwinKernel::OSKextLoadedKextSummary::LoadImageUsingMemoryModule (
Target &target = process->GetTarget();
ModuleSP memory_module_sp;
- // Use the memory module as the module if we have one...
+
+ // If this is a kext and the user asked us to ignore kexts, don't try to load it.
+ if (kernel_image == false && target.GetDisableKextLoading() == true)
+ {
+ return false;
+ }
+
+ // Use the memory module as the module if we have one
if (address != LLDB_INVALID_ADDRESS)
{
FileSpec file_spec;
@@ -395,6 +402,7 @@ DynamicLoaderDarwinKernel::LoadKernelModuleIfNeeded()
{
m_kernel.Clear(false);
m_kernel.module_sp = m_process->GetTarget().GetExecutableModule();
+ m_kernel.kernel_image = true;
ConstString kernel_name("mach_kernel");
if (m_kernel.module_sp.get()
OpenPOWER on IntegriCloud