llvm-project/lldb/source/Core
Jonas Devlieghere 11f45f36dc
[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
2022-08-15 17:57:24 -07:00
..
Address.cpp [lldb] LLVM_FALLTHROUGH => [[fallthrough]]. NFC 2022-08-08 11:31:49 -07:00
AddressRange.cpp [lldb] LLVM_FALLTHROUGH => [[fallthrough]]. NFC 2022-08-08 11:31:49 -07:00
AddressResolver.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
AddressResolverFileLine.cpp [lldb] Use value_or instead of getValueOr (NFC) 2022-06-19 09:12:01 -07:00
CMakeLists.txt [llvm][lldb] use FindLibEdit.cmake everywhere 2022-05-12 15:59:41 -07:00
Communication.cpp [lldb] LLVM_FALLTHROUGH => [[fallthrough]]. NFC 2022-08-08 11:31:49 -07:00
CoreProperties.td [lldb] Fetching symbols in the background with dsymForUUID 2022-08-15 17:57:24 -07:00
DataFileCache.cpp [lldb] Allow DataFileCache to be constructed with a different policy 2022-08-11 09:28:30 -07:00
Debugger.cpp [lldb] Fetching symbols in the background with dsymForUUID 2022-08-15 17:57:24 -07:00
DebuggerEvents.cpp [lldb] Fetching symbols in the background with dsymForUUID 2022-08-15 17:57:24 -07:00
Declaration.cpp [lldb] Move and clean-up the Declaration class (NFC) 2021-05-04 16:34:44 +00:00
Disassembler.cpp [lldb] Silence a GCC warning about missing returns after a fully covered switch. NFC. 2022-08-02 10:57:33 +03:00
DumpDataExtractor.cpp [lldb] Always use APFloat for FP dumping 2022-07-27 14:30:35 +02:00
DumpRegisterValue.cpp [lldb] Always use APFloat for FP dumping 2022-07-27 14:30:35 +02:00
DynamicLoader.cpp Allow firmware binaries to be specified only by load address 2022-08-02 14:14:16 -07:00
EmulateInstruction.cpp Remove ConstString from DynamicLoader, JITLoader and Instruction plugin names 2021-10-25 10:32:35 +02:00
FileLineResolver.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
FileSpecList.cpp Implement better path matching in FileSpecList::FindCompatibleIndex(...). 2022-08-08 15:20:38 -07:00
FormatEntity.cpp [LLDB][NFC] Reliability Fixes for FormatEntity 2022-08-15 10:16:47 -07:00
Highlighter.cpp
IOHandler.cpp Don't use Optional::getValue (NFC) 2022-06-20 23:35:53 -07:00
IOHandlerCursesGUI.cpp [LLDB][NFC] Reliability fixes for IOHandlerCursesGUI 2022-08-11 21:10:53 -07:00
Mangled.cpp [demangler] Rust demangler buffer return 2022-04-13 08:50:04 -07:00
Module.cpp [lldb] Fetching symbols in the background with dsymForUUID 2022-08-15 17:57:24 -07:00
ModuleChild.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
ModuleList.cpp [lldb] Fetching symbols in the background with dsymForUUID 2022-08-15 17:57:24 -07:00
Opcode.cpp [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
PluginManager.cpp [NFC][lldb][trace] Rename trace session to trace bundle 2022-06-24 08:41:33 -07:00
Progress.cpp Add a progress class that can track long running operations in LLDB. 2021-03-24 12:58:13 -07:00
RichManglingContext.cpp [lldb] Add llvm_unreachable in RichManglingContext 2022-02-18 08:38:03 -08:00
SearchFilter.cpp [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
Section.cpp [lldb] Fix modernize-use-equals-default warnings (NFC) 2022-06-17 15:08:02 -07:00
SourceLocationSpec.cpp [lldb] Use value_or instead of getValueOr (NFC) 2022-06-19 09:12:01 -07:00
SourceManager.cpp Check that a FileSpec has a Directory component before using 2022-05-26 11:12:37 -07:00
StreamAsynchronousIO.cpp [lldb] Print diagnostic prefixes (error, warning) in color 2022-04-12 20:28:29 -07:00
StreamFile.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
UserSettingsController.cpp
Value.cpp [lldb] Use =default in the ValueList class 2022-03-30 09:12:59 +02:00
ValueObject.cpp [lldb] LLVM_FALLTHROUGH => [[fallthrough]]. NFC 2022-08-08 11:31:49 -07:00
ValueObjectCast.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
ValueObjectChild.cpp Use value instead of getValue (NFC) 2022-07-15 20:03:13 -07:00
ValueObjectConstResult.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
ValueObjectConstResultCast.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
ValueObjectConstResultChild.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
ValueObjectConstResultImpl.cpp Remove unused variable. 2021-11-18 15:58:20 -08:00
ValueObjectDynamicValue.cpp [lldb] Change back LLDBLog::Commands->Types in a couple more places 2022-03-16 15:46:17 +01:00
ValueObjectList.cpp
ValueObjectMemory.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
ValueObjectRegister.cpp [lldb] Change back LLDBLog::Commands->Types in a couple more places 2022-03-16 15:46:17 +01:00
ValueObjectSyntheticFilter.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
ValueObjectUpdater.cpp [lldb][NFC] Rename the second ValueObjectManager to ValueObjectUpdater and remove the dead code 2021-02-24 13:58:01 +01:00
ValueObjectVariable.cpp Reland "[LLDB][NFC] Decouple dwarf location table from DWARFExpression." 2022-07-12 10:54:24 -07:00