[Lldb-commits] [lldb] r218156 - We had to squirrel away the dyld module before doing ResolveExecutableModule, since

Jim Ingham jingham at apple.com
Fri Sep 19 14:56:46 PDT 2014


Author: jingham
Date: Fri Sep 19 16:56:45 2014
New Revision: 218156

URL: http://llvm.org/viewvc/llvm-project?rev=218156&view=rev
Log:
We had to squirrel away the dyld module before doing ResolveExecutableModule, since
that would clear the module list, and then put it back by hand.  But we forgot to 
also put its sections back in the target SectionList, so we would jettison it as
unloaded when we finished handling the first real load event.  Add its sections.

<rdar://problem/18385947>

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=218156&r1=218155&r2=218156&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp Fri Sep 19 16:56:45 2014
@@ -1350,7 +1350,13 @@ DynamicLoaderMacOSXDYLD::UpdateImageInfo
                                                             get_dependent_images);
 
                 if (dyld_module_sp)
-                    target.GetImages().AppendIfNeeded (dyld_module_sp);
+                {
+                   if(target.GetImages().AppendIfNeeded (dyld_module_sp))
+                   {
+                        // Also add it to the section list.
+                        UpdateImageLoadAddress(dyld_module_sp.get(), m_dyld);
+                   }
+                }
             }
         }
     }





More information about the lldb-commits mailing list