Skip to content

Commit 434d67e

Browse files
committed
Use Module's FileSpec for limiting binaries to set dyld breakpoint in
When DynamicLoaderMacOS::SetNotificationBreakpoint sets the breakpoint for new binaries being loaded/unloaded, it limits the scope of that breakpoint to just dyld, so we don't re-evaluate the breakpoint for every new binary loaded. I wrote this to get the module's ObjectFile FileSpec in an earlier change, but this is not correct. If lldb is debugging a remote system, and it had to read dyld out of memory from the remote system, it will have no FileSpec on the lldb debugger host. We need to grab the Module's FileSpec, which in this case is actually falling back to the PlatformFileSpec, the binary path on the target system. rdar://84199646 (cherry picked from commit 35d7101)
1 parent cc7687e commit 434d67e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ bool DynamicLoaderMacOS::SetNotificationBreakpoint() {
350350
LazyBool skip_prologue = eLazyBoolNo;
351351
FileSpecList *source_files = nullptr;
352352
FileSpecList dyld_filelist;
353-
dyld_filelist.Append(dyld_sp->GetObjectFile()->GetFileSpec());
353+
dyld_filelist.Append(dyld_sp->GetFileSpec());
354354

355355
Breakpoint *breakpoint =
356356
m_process->GetTarget()

0 commit comments

Comments
 (0)