[Lldb-commits] [lldb] r292454 - Fix a problem with the new dyld interface code -- when a new process
Jason Molenda via lldb-commits
lldb-commits at lists.llvm.org
Wed Jan 18 16:20:29 PST 2017
Author: jmolenda
Date: Wed Jan 18 18:20:29 2017
New Revision: 292454
URL: http://llvm.org/viewvc/llvm-project?rev=292454&view=rev
Log:
Fix a problem with the new dyld interface code -- when a new process
starts up, we need to clear the target's image list and only add
the binaries into the target that are actually present in this
process run.
<rdar://problem/29857613>
Modified:
lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp
Modified: lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp?rev=292454&r1=292453&r2=292454&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp Wed Jan 18 18:20:29 2017
@@ -151,6 +151,11 @@ void DynamicLoaderMacOS::ClearNotificati
void DynamicLoaderMacOS::DoInitialImageFetch() {
Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER));
+ // Remove any binaries we pre-loaded in the Target before launching/attaching.
+ // If the same binaries are present in the process, we'll get them from the
+ // shared module cache, we won't need to re-load them from disk.
+ UnloadAllImages();
+
StructuredData::ObjectSP all_image_info_json_sp(
m_process->GetLoadedDynamicLibrariesInfos());
ImageInfo::collection image_infos;
More information about the lldb-commits
mailing list