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
This commit is contained in:
Jim Ingham 2011-08-09 20:45:45 +00:00
parent 85a96b12de
commit 04f5672c5b
1 changed files with 3 additions and 1 deletions

View File

@ -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