[NFC] Don't bother with unstripped binary w/ dSYM, don't DebugSymbols twice
authorJason Molenda <jason@molenda.com>
Mon, 16 May 2022 22:27:21 +0000 (15:27 -0700)
committerJason Molenda <jason@molenda.com>
Mon, 16 May 2022 22:30:39 +0000 (15:30 -0700)
commitd2f3b6020fbfa2dd56ebd03c942acda961c421e2
treea931dc359b92e39b76947d2a4506bad4a370582d
parentb653b409ff44b09ade04bb6e579f5f9790424611
[NFC] Don't bother with unstripped binary w/ dSYM, don't DebugSymbols twice

This patch addresses two perf issues when we find a dSYM on macOS
after calling into the DebugSymbols framework.  First, when we have
a local (probably stripped) binaary, we find the dSYM and we may
be told about the location of the symbol rich binary (probably
unstripped) which may be on a remote filesystem.  We don't need the
unstripped binary, use the local binary we already have.
Second, after we've found the path to the dSYM, save that in the Module
so we don't call into DebugSymbols a second time later on to
rediscover it.  If the user has a DBGShellCommands set, we need to
exec that process twice, serially, which can add up.

Differential Revision: https://reviews.llvm.org/D125616
rdar://84576917
lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp
lldb/source/Symbol/LocateSymbolFileMacOSX.cpp