llvm-project/lldb/source/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
..
ARM64_DWARF_Registers.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
ARM64_ehframe_Registers.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
ARM_DWARF_Registers.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
ARM_ehframe_Registers.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
ArchSpec.cpp [lldb] Add YAML traits for ArchSpec and ProcessInstanceInfo 2020-03-12 14:38:37 -07:00
Args.cpp [Reproducers] Serialize process arguments in ProcessInfo 2020-05-12 11:12:37 -07:00
Baton.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
Broadcaster.cpp [lldb/Utility] Use emplace_back instead of push_back (NFC) 2020-03-02 15:54:00 -08:00
CMakeLists.txt [lldb] Cleans up system_libs 2020-05-20 12:30:08 -07:00
CompletionRequest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
Connection.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
ConstString.cpp [lldb/Utility] Add YAML traits for ConstString and FileSpec. 2020-03-12 10:28:21 -07:00
DataBufferHeap.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
DataBufferLLVM.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
DataEncoder.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
DataExtractor.cpp [lldb] Fix UBSan regression in GetSLEB128 2020-06-05 12:00:44 +02:00
Environment.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
Event.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
FileSpec.cpp [lldb/Utility] Add YAML traits for ConstString and FileSpec. 2020-03-12 10:28:21 -07:00
GDBRemote.cpp [lldb/Utility] YAML validation should be orthogonal to packet semantics. 2020-01-03 14:23:42 -08:00
IOObject.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
LLDBAssert.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
Listener.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
Log.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Logging.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
NameMatches.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
PPC64LE_DWARF_Registers.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
PPC64_DWARF_Registers.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
ProcessInfo.cpp [Reproducers] Serialize process arguments in ProcessInfo 2020-05-12 11:12:37 -07:00
RegisterValue.cpp Extend max register size to accommodate AArch64 SVE vector regs 2020-04-29 07:51:30 +05:00
RegularExpression.cpp [lldb] Improve error message when --func-regex parameter for the breakpoint command is invalid 2020-04-27 09:55:06 +02:00
Reproducer.cpp [lldb/Reproducers] Support new replay mode: passive replay 2020-04-20 09:41:40 -07:00
ReproducerInstrumentation.cpp [lldb/Reproducers] Skip API logging in the DUMMY macro 2020-05-27 10:35:43 -07:00
Scalar.cpp [Scalar] Fix assignment operator for long long. 2020-06-03 13:26:25 +02:00
SelectHelper.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
State.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
Status.cpp [lldb/Utility] Improve error_code->Status conversion 2020-04-23 16:12:41 +02:00
Stream.cpp [lldb/Utility] Fix unspecified behavior. 2020-02-24 21:25:55 -08:00
StreamCallback.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
StreamString.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
StringExtractor.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
StringExtractorGDBRemote.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
StringLexer.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
StringList.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
StructuredData.cpp [lldb][NFC] Remove several inefficient ConstString -> const char * -> StringRef conversions 2020-02-11 09:14:41 +01:00
TildeExpressionResolver.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
Timer.cpp Remove unneeded Compiler.h and DataTypes.h includes, NFC 2020-02-26 10:36:17 -08:00
UUID.cpp Support build-ids of other sizes than 16 in UUID::SetFromStringRef 2020-06-07 10:03:41 +00:00
UriParser.cpp [LLDB] Fix parsing of IPv6 host:port inside brackets 2020-03-26 11:35:54 +01:00
UserID.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
UserIDResolver.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
UuidCompatibility.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
VASprintf.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
VMRange.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
XcodeSDK.cpp Move GetXcode*Directory into HostInfo (NFC) 2020-06-05 11:59:22 -07:00