llvm-project/lldb/unittests
Fred Riss 8113a8bb79 [lldb/ObjectFileMachO] Fetch shared cache images from our own shared cache
Summary:
On macOS 11, the libraries that have been integrated in the system
shared cache are not present on the filesystem anymore. LLDB was
using those files to get access to the symbols of those libraries.
LLDB can get the images from the target process memory though.

This has 2 consequences:
 - LLDB cannot load the images before the process starts, reporting
   an error if someone tries to break on a system symbol.
 - Loading the symbols by downloading the data from the inferior
   is super slow. It takes tens of seconds at the start of the
   debug session to populate the Module list.

To fix this, we can use the library images LLDB has in its own
mapping of the shared cache. Shared cache images are somewhat
special as their LINKEDIT segment is moved to the end of the cache
and thus the images are not contiguous in memory. All of this can
hidden in ObjectFileMachO.

This patch fixes a number of test failures on macOS 11 due to the
first problem described above and adds some specific unittesting
for the new SharedCache Host utilities.

Reviewers: jasonmolenda, labath

Subscribers: llvm-commits, lldb-commits

Tags: #lldb, #llvm

Differential Revision: https://reviews.llvm.org/D83023
2020-07-16 10:37:37 -07:00
..
API [lldb/CMake] Set the PYTHON_RPATH for the unit tests 2020-04-30 11:05:50 -07:00
Breakpoint [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
Core [lldb/Module] Allow for the creation of memory-only modules 2020-07-14 08:45:44 -07:00
DataFormatter [lldb/StringPrinter] Support strings with invalid utf8 sub-sequences 2020-06-03 12:24:23 -07:00
Disassembler [lldb/Plugins] Rename lldbPluginDisassemblerLLVM (NFC) 2020-02-17 19:14:01 -08:00
Editline [lldb] Rename Master/Slave to Primary/Secondary (NFC) 2020-06-15 15:38:28 -07:00
Expression [DWARFYAML][debug_info] Replace 'InitialLength' with 'Format' and 'Length'. 2020-06-30 16:28:39 +08:00
Host [lldb] Rename Master/Slave to Primary/Secondary (NFC) 2020-06-15 15:38:28 -07:00
Instruction Fix UB in EmulateInstructionARM64.cpp 2020-06-01 18:11:50 -07:00
Interpreter Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Language [lldb] Reactivate Objective-C++ plugin 2020-06-19 19:16:46 +02:00
ObjectFile [lldb/ObjectFileMachO] Fetch shared cache images from our own shared cache 2020-07-16 10:37:37 -07:00
Platform [lldb/Test] Fix unit test suffixes and add a CMake error. 2020-06-12 14:18:27 -07:00
Process [lldb/Test] Fix unit test suffixes and add a CMake error. 2020-06-12 14:18:27 -07:00
ScriptInterpreter [lldb/ScriptInterpreter] Fix Windows error C2371: 'pid_t': redefinition 2020-06-25 17:15:29 -07:00
Signals [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
Symbol [lldb/Module] Allow for the creation of memory-only modules 2020-07-14 08:45:44 -07:00
SymbolFile [lldb] Fix TestModuleGetXcodeSDK test after DWARFYAML change 2020-06-30 14:05:20 +02:00
Target Support build-ids of other sizes than 16 in UUID::SetFromStringRef 2020-06-07 10:03:41 +00:00
TestingSupport [lldb] Delete useless assertion 2020-07-15 15:42:53 +02:00
Thread [lldb/Test] Fix unittest name 2020-06-12 14:01:14 -07:00
UnwindAssembly Bug where insn-based unwind plans on arm64 could be wrong 2020-04-14 16:57:25 -07:00
Utility [lldb/Utility] Rewrite Scalar::SetValueFromCString 2020-07-13 16:44:42 +02:00
debugserver [lldb] Make RNBSocketTest compile again after socket modernization 2020-04-23 17:00:02 +02:00
tools [lldb] Change Communication::SetConnection to take a unique_ptr 2020-04-02 14:42:25 +02:00
CMakeLists.txt [lldb/Test] Fix unit test suffixes and add a CMake error. 2020-06-12 14:18:27 -07:00
gtest_common.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00