summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/DynamicLoader
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2012-05-16 17:16:59 +0000
committerJim Ingham <jingham@apple.com>2012-05-16 17:16:59 +0000
commitb3574ff8d09a3d550dcabdef22277d146ee1f89f (patch)
treea76b68962a31bdc16da98b470eb6656c2d3a2c9a /lldb/source/Plugins/DynamicLoader
parent6904a934ec087256637706b6e2119a5f3a19375d (diff)
downloadbcm5719-llvm-b3574ff8d09a3d550dcabdef22277d146ee1f89f.tar.gz
bcm5719-llvm-b3574ff8d09a3d550dcabdef22277d146ee1f89f.zip
Don't do a stat compare of the module with its underlying file if we already matched the UUID.
llvm-svn: 156928
Diffstat (limited to 'lldb/source/Plugins/DynamicLoader')
-rw-r--r--lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp27
1 files changed, 12 insertions, 15 deletions
diff --git a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
index 6219fef98b2..c8e9cec70c5 100644
--- a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
+++ b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
@@ -289,7 +289,7 @@ DynamicLoaderMacOSXDYLD::FindTargetModuleForDYLDImageInfo (const DYLDImageInfo &
module_spec.GetUUID() = image_info.uuid;
ModuleSP module_sp (target_images.FindFirstModule (module_spec));
- if (module_sp)
+ if (module_sp && !module_spec.GetUUID().IsValid() && !module_sp->GetUUID().IsValid())
{
// No UUID, we must rely upon the cached module modification
// time and the modification time of the file on disk
@@ -301,22 +301,19 @@ DynamicLoaderMacOSXDYLD::FindTargetModuleForDYLDImageInfo (const DYLDImageInfo &
{
if (can_create)
{
- if (!module_sp)
+ module_sp = m_process->GetTarget().GetSharedModule (module_spec);
+ if (!module_sp || module_sp->GetObjectFile() == NULL)
{
- module_sp = m_process->GetTarget().GetSharedModule (module_spec);
- if (!module_sp || module_sp->GetObjectFile() == NULL)
- {
- const bool add_image_to_target = true;
- const bool load_image_sections_in_target = false;
- module_sp = m_process->ReadModuleFromMemory (image_info.file_spec,
- image_info.address,
- add_image_to_target,
- load_image_sections_in_target);
- }
-
- if (did_create_ptr)
- *did_create_ptr = module_sp;
+ const bool add_image_to_target = true;
+ const bool load_image_sections_in_target = false;
+ module_sp = m_process->ReadModuleFromMemory (image_info.file_spec,
+ image_info.address,
+ add_image_to_target,
+ load_image_sections_in_target);
}
+
+ if (did_create_ptr)
+ *did_create_ptr = module_sp;
}
}
return module_sp;
OpenPOWER on IntegriCloud