From 04f5672c5b07628d48554869afe38c646c84cc3d Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Tue, 9 Aug 2011 20:45:45 +0000 Subject: [PATCH] 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. llvm-svn: 137143 --- .../DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp index 39337ca02c0d..8031b3aad79e 100644 --- a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp +++ b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp @@ -829,7 +829,9 @@ DynamicLoaderMacOSXDYLD::RemoveModulesUsingImageInfosAddress (lldb::addr_t image 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