llvm-project/lldb/unittests
Jonas Devlieghere a114ec0c6d
[lldb] Change the way we pick a platform for fat binaries
Currently, when creating a target for a fat binary, we error out if more
than one platforms can support the different architectures in the
binary. There are situations where it makes sense for multiple platforms
to support the same architectures: for example the host and
remote-macosx platform on Darwin.

The only way to currently disambiguate between them is to specify the
architecture. This patch changes that to take into account the selected
and host platform. The new algorithm works a follows:

1. Pick the selected platform if it matches any of the architectures.
2. Pick the host platform if it matches any of the architectures.
3. If there's one platform that works for all architectures, pick that.

If none of the above apply then we either have no platform supporting
the architectures in the fat binary or multiple platforms with no good
way to disambiguate between them.

I've added a bunch of unit tests to codify this new behavior.

rdar://90360204

Differential revision: https://reviews.llvm.org/D122684
2022-03-30 15:30:05 -07:00
..
API [lldb] Handle missing SBStructuredData copy assignment cases 2021-05-05 15:12:03 -07:00
Breakpoint [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
Core [lldb] Report debugger diagnostics as events 2022-03-16 08:33:01 -07:00
DataFormatter [nfc] [lldb] Prevent needless copies of DataExtractor 2021-08-04 20:35:53 +02:00
Disassembler [lldb/Plugins] Rename lldbPluginDisassemblerLLVM (NFC) 2020-02-17 19:14:01 -08:00
Editline Re-land "[lldb] Synchronize output through the IOHandler" 2022-03-15 12:53:46 -07:00
Expression [LLDB] Remove cases of using namespace llvm:: from header file 2022-03-03 10:39:06 -08:00
Host [LLDB] Applying clang-tidy modernize-use-default-member-init over LLDB 2022-03-14 13:32:03 -07:00
Instruction Fix UB in EmulateInstructionARM64.cpp 2020-06-01 18:11:50 -07:00
Interpreter [lldb] Fix (unintentional) recursion in CommandObjectRegexCommand 2022-02-23 12:34:14 -08:00
Language [lldb] Return StringRef from PluginInterface::GetPluginName 2021-10-18 10:14:42 +02:00
ObjectFile [lldb] Test parsing the symtab with indirect symbols from the shared cache 2022-03-23 21:13:55 -07:00
Platform [lldb] Change the way we pick a platform for fat binaries 2022-03-30 15:30:05 -07:00
Process [trace][intelpt] Server side changes for TSC to wall time conversion 2022-03-24 05:36:21 -07:00
ScriptInterpreter [lldb] Initialize Python exactly once 2022-01-19 09:56:55 -08:00
Signals [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
Symbol [PDB] add missing char8_t for 5c9e20d 2022-03-01 14:24:21 -08:00
SymbolFile [LLDB] Remove cases of using namespace std 2022-03-04 12:50:25 -08:00
Target [lldb] Plumb process host architecture through platform selection 2022-03-14 12:17:01 -07:00
TestingSupport Reapply "[cmake] Prefix gtest and gtest_main with "llvm_"." 2022-03-04 13:45:43 -08:00
Thread [lldb] Return StringRef from PluginInterface::GetPluginName 2021-10-18 10:14:42 +02:00
UnwindAssembly Bug where insn-based unwind plans on arm64 could be wrong 2020-04-14 16:57:25 -07:00
Utility [lldb] Fix interpreting absolute Windows paths with forward slashes 2022-03-26 22:34:02 +02:00
debugserver [lldb] [unittests] Fix TcpListen() call in RNBSocketTest 2021-10-26 21:08:03 +02:00
tools [lldb/host] Remove monitor_signals argument from process monitoring functions 2022-02-24 11:12:59 +01:00
CMakeLists.txt Reapply "[cmake] Prefix gtest and gtest_main with "llvm_"." 2022-03-04 13:45:43 -08:00
gtest_common.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00