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

Jim Ingham jingham at apple.com
Tue Aug 9 13:45:45 PDT 2011


Author: jingham
Date: Tue Aug  9 15:45:45 2011
New Revision: 137143

URL: http://llvm.org/viewvc/llvm-project?rev=137143&view=rev
Log:
When unloading a library, pass the old complete version of the library to UnloadImageLoadAddress, since that
one is completely filled in.  The one we make up from the event doesn't have section info since the
library has already been unloaded by the time we get to it.

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=137143&r1=137142&r2=137143&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp Tue Aug  9 15:45:45 2011
@@ -829,7 +829,9 @@
                 ModuleSP unload_image_module_sp (FindTargetModuleForDYLDImageInfo (image_infos[idx], false, NULL));
                 if (unload_image_module_sp.get())
                 {
-                    UnloadImageLoadAddress (unload_image_module_sp.get(), image_infos[idx]);
+                    // When we unload, be sure to use the image info from the old list,
+                    // since that has sections correctly filled in.
+                    UnloadImageLoadAddress (unload_image_module_sp.get(), *pos);
                     unloaded_module_list.AppendIfNeeded (unload_image_module_sp);
                 }
                 else





More information about the lldb-commits mailing list