summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2012-10-19 03:40:45 +0000
committerJason Molenda <jmolenda@apple.com>2012-10-19 03:40:45 +0000
commit87a04b24450ae0a19398304623d7b8bc04e68e97 (patch)
tree7e083733c8b86a8cf1ab5cb38b14ce71877c0e34 /lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
parent4edb74cf81352541b9d93ff72568378211e26f09 (diff)
downloadbcm5719-llvm-87a04b24450ae0a19398304623d7b8bc04e68e97.tar.gz
bcm5719-llvm-87a04b24450ae0a19398304623d7b8bc04e68e97.zip
Add a new target setting to disable automatic loading of kext images
in a kernel debug session: settings set target.disable-kext-loading true <rdar://problem/12490623> llvm-svn: 166262
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