llvm-project/lldb/unittests/Utility
Jaroslav Sevcik 1beffc1888 Support build-ids of other sizes than 16 in UUID::SetFromStringRef
SBTarget::AddModule currently handles the UUID parameter in a very
weird way: UUIDs with more than 16 bytes are trimmed to 16 bytes. On
the other hand, shorter-than-16-bytes UUIDs are completely ignored. In
this patch, we change the parsing code to handle UUIDs of arbitrary
size.

To support arbitrary size UUIDs in SBTarget::AddModule, this patch
changes UUID::SetFromStringRef to parse UUIDs of arbitrary length. We
subtly change the semantics of SetFromStringRef - SetFromStringRef now
only succeeds if the entire input is consumed to prevent some
prefix-parsing confusion. This is up for discussion, but I believe
this is more consistent - we always return false for invalid UUIDs
rather than sometimes truncating to a valid prefix. Also, all the
call-sites except the API and interpreter seem to expect to consume
the entire input.

This also adds tests for adding existing modules 4-, 16-, and 20-byte
build-ids. Finally, we took the liberty of testing the minidump
scenario we care about - removing placeholder module from minidump and
replacing it with the real module.

Reviewed By: labath, friss

Differential Revision: https://reviews.llvm.org/D80755
2020-06-07 10:03:41 +00:00
..
Inputs
AnsiTerminalTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
ArchSpecTest.cpp [lldb] NFC: Fix trivial typo in comments, documents, and messages 2020-04-07 01:06:16 +09:00
ArgsTest.cpp [Reproducers] Serialize process arguments in ProcessInfo 2020-05-12 11:12:37 -07:00
BroadcasterTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
CMakeLists.txt Remap the target (Xcode) SDK directory to the host SDK directory. 2020-04-06 15:51:30 -07:00
CompletionRequestTest.cpp [lldb] Cut off unused suffix in CompletionRequest::GetRawLine 2020-01-28 11:12:22 +01:00
ConstStringTest.cpp [lldb/Utility] Add YAML traits for ConstString and FileSpec. 2020-03-12 10:28:21 -07:00
DataExtractorTest.cpp [lldb] Fix SLEB128 decoding 2020-06-04 19:41:24 +02:00
EnvironmentTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
EventTest.cpp [ADT] Make StringRef's std::string conversion operator explicit 2020-01-28 23:47:07 +01:00
FileSpecTest.cpp Update LLDB filespec tests for remove_dots change 2020-05-04 17:27:16 -07:00
FlagsTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
ListenerTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
LogTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
NameMatchesTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
OptionsWithRawTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
PredicateTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
ProcessInfoTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
ProcessInstanceInfoTest.cpp [lldb] Add YAML traits for ArchSpec and ProcessInstanceInfo 2020-03-12 14:38:37 -07:00
RangeMapTest.cpp Add unit tests for RangeDataVector::FindEntryIndexesThatContain 2020-02-26 16:47:42 +01:00
RangeTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
RegisterValueTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
RegularExpressionTest.cpp [Utility] Reimplement RegularExpression on top of llvm::Regex 2019-08-16 21:25:36 +00:00
ReproducerInstrumentationTest.cpp [lldb/Reproducers] Fix passive replay for (char*, size_t) functions. 2020-04-20 13:26:11 -07:00
ReproducerTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
ScalarTest.cpp [Scalar] Fix assignment operator for long long. 2020-06-03 13:26:25 +02:00
SharedClusterTest.cpp [lldb] Delete the SharingPtr class 2020-02-11 13:23:18 +01:00
StateTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
StatusTest.cpp [lldb/Utility] Improve error_code->Status conversion 2020-04-23 16:12:41 +02:00
StreamTeeTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
StreamTest.cpp [lldb][NFC] Remove Stream::Indent(const char *) overload in favor of the StringRef version 2020-02-11 13:29:32 +01:00
StringExtractorTest.cpp [NFC] Return llvm::StringRef from StringExtractor::GetStringRef. 2019-08-21 04:55:56 +00:00
StringLexerTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
StringListTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
StructuredDataTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
SubsystemRAIITest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
TildeExpressionResolverTest.cpp Revert "[FileSystem] Make use of FS in TildeExpressionResolver" 2018-11-09 01:59:28 +00:00
TimeoutTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
TimerTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
UUIDTest.cpp Support build-ids of other sizes than 16 in UUID::SetFromStringRef 2020-06-07 10:03:41 +00:00
UriParserTest.cpp [LLDB] Fix parsing of IPv6 host:port inside brackets 2020-03-26 11:35:54 +01:00
UserIDResolverTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
VASprintfTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
VMRangeTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
XcodeSDKTest.cpp Move GetXcode*Directory into HostInfo (NFC) 2020-06-05 11:59:22 -07:00