Use Module's FileSpec for limiting binaries to set dyld breakpoint in
authorJason Molenda <jason@molenda.com>
Fri, 15 Oct 2021 06:55:37 +0000 (23:55 -0700)
committerJason Molenda <jason@molenda.com>
Fri, 15 Oct 2021 06:58:23 +0000 (23:58 -0700)
commit35d710148b98e2ec52056271e7f9103620593b7a
treec61e4b44ac06b105a4b1cabbbe38d5e4d4c24fa0
parent7c704c0f53bd7f785ec99fc6bedd71569816a28c
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
lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp