summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2012-11-08 02:22:02 +0000
committerEnrico Granata <egranata@apple.com>2012-11-08 02:22:02 +0000
commit1759848be00a5ab48ba5bccb70945b30c68da7f1 (patch)
tree75c6491edf772cba8614f2d67be5681e9d98b5a3 /lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
parent489b5d645f370926894c88d8e5fd27f17aabff82 (diff)
downloadbcm5719-llvm-1759848be00a5ab48ba5bccb70945b30c68da7f1.tar.gz
bcm5719-llvm-1759848be00a5ab48ba5bccb70945b30c68da7f1.zip
<rdar://problem/12586350>
This commit does three things: (a) introduces a new notification model for adding/removing/changing modules to a ModuleList, and applies it to the Target's ModuleList, so that we make sure to always trigger the right set of actions whenever modules come and go in a target. Certain spots in the code still need to "manually" notify the Target for several reasons, so this is a work in progress (b) adds a new capability to the Platforms: locating a scripting resources associated to a module. A scripting resource is a Python file that can load commands, formatters, ... and any other action of interest corresponding to the loading of a module. At the moment, this is only implemented on Mac OS X and only for files inside .dSYM bundles - the next step is going to be letting the frameworks themselves hold their scripting resources. Implementors of platforms for other systems are free to implement "the right thing" for their own worlds (c) hooking up items (a) and (b) so that targets auto-load the scripting resources as the corresponding modules get loaded in a target. This has a few caveats at the moment: - the user needs to manually add the .py file to the dSYM (soon, it will also work in the framework itself) - if two modules with the same name show up during the lifetime of an LLDB session, the second one won't be able to load its scripting resource, but will otherwise work just fine llvm-svn: 167569
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, 2 insertions, 5 deletions
diff --git a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
index 3863762a276..194f21e0067 100644
--- a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
+++ b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
@@ -281,7 +281,7 @@ DynamicLoaderDarwinKernel::OSKextLoadedKextSummary::LoadImageUsingMemoryModule (
{
if (uuid_is_valid)
{
- ModuleList &target_images = target.GetImages();
+ const ModuleList &target_images = target.GetImages();
module_sp = target_images.FindModule(uuid);
if (!module_sp)
@@ -669,10 +669,7 @@ DynamicLoaderDarwinKernel::AddModulesUsingImageInfos (OSKextLoadedKextSummary::c
loaded_module_list.AppendIfNeeded (image_infos[idx].module_sp);
}
- if (loaded_module_list.GetSize() > 0)
- {
- m_process->GetTarget().ModulesDidLoad (loaded_module_list);
- }
+ m_process->GetTarget().ModulesDidLoad (loaded_module_list);
return true;
}
OpenPOWER on IntegriCloud