[Lldb-commits] [lldb] r156928 - /lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp

Jim Ingham jingham at apple.com
Wed May 16 10:16:59 PDT 2012


Author: jingham
Date: Wed May 16 12:16:59 2012
New Revision: 156928

URL: http://llvm.org/viewvc/llvm-project?rev=156928&view=rev
Log:
Don't do a stat compare of the module with its underlying file if we already matched the UUID.

Modified:
    lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp

Modified: lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp?rev=156928&r1=156927&r2=156928&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp Wed May 16 12:16:59 2012
@@ -289,7 +289,7 @@
     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 @@
     {
         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;





More information about the lldb-commits mailing list