[lldb] Fetching symbols in the background with dsymForUUID
On macOS, LLDB uses the DebugSymbols.framework to locate symbol rich dSYM bundles. [1] The framework uses a variety of methods, one of them calling into a binary or shell script to locate (and download) dSYMs. Internally at Apple, that tool is called dsymForUUID and for simplicity I'm just going to refer to it that way here too, even though it can be be an arbitrary executable. The most common use case for dsymForUUID is to fetch symbols from the network. This can take a long time, and because the calls to the DebugSymbols.framework are blocking, it takes a while to launch the process. This is expected and therefore many people don't use this functionality, but instead use add-dsym when they want symbols for a given frame, backtrace or module. This is a little faster because you're only fetching symbols for the module you care about, but it's still a slow, blocking operation. This patch introduces a hybrid approach between the two. When symbols.enable-background-lookup is enabled, lldb will do the equivalent of add-dsym in the background for every module that shows up in the backtrace but doesn't have symbols for. From the user's perspective there is no slowdown, because the process launches immediately, with whatever symbols are available. Meanwhile, more symbol information is added over time as the background fetching completes. [1] https://lldb.llvm.org/use/symbols.html rdar://76241471 Differential revision: https://reviews.llvm.org/D131328
Loading
Please sign in to comment