llvm-project/lldb/source/Utility
David Spickett 7d27230de3 [lldb][AArch64] Add memory tag writing to lldb-server
This is implemented using the QMemTags packet, as specified
by GDB in:
https://sourceware.org/gdb/current/onlinedocs/gdb/General-Query-Packets.html#General-Query-Packets

(recall that qMemTags was previously added to read tags)

On receipt of a valid packet lldb-server will:
* align the given address and length to granules
  (most of the time lldb will have already done this
  but the specification doesn't guarantee it)
* Repeat the supplied tags as many times as needed to cover
  the range. (if tags > range we just use as many as needed)
* Call ptrace POKEMTETAGS to write the tags.

The ptrace step will loop just like the tag read does,
until all tags are written or we get an error.
Meaning that if ptrace succeeds it could be a partial write.
So we call it again and if we then get an error, return an error to
lldb.

We are not going to attempt to restore tags after a partial
write followed by an error. This matches the behaviour of the
existing memory writes.

The lldb-server tests have been extended to include read and
write in the same test file. With some updated function names
since "qMemTags" vs "QMemTags" isn't very clear when they're
next to each other.

Reviewed By: omjavaid

Differential Revision: https://reviews.llvm.org/D105180
2021-07-27 12:02:17 +01:00
..
ARM64_DWARF_Registers.h [LLDB] Update AArch64 Dwarf and EH frame register numbers 2020-07-10 11:45:39 +05:00
ARM64_ehframe_Registers.h [LLDB] Update AArch64 Dwarf and EH frame register numbers 2020-07-10 11:45:39 +05: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] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
Args.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -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][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
CMakeLists.txt [trace][intel-pt] Implement trace start and trace stop 2021-03-30 17:31:37 -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] Rename StringRef _lower() method calls to _insensitive() 2021-06-25 00:22:01 +03:00
DataBufferHeap.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
DataBufferLLVM.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
DataEncoder.cpp [lldb] Use C++11 default member initializers 2021-06-09 09:43:13 -07:00
DataExtractor.cpp [lldb] Use C++11 default member initializers 2021-06-09 09:43:13 -07:00
Environment.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
Event.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
FileSpec.cpp [lldb] Rename StringRef _lower() method calls to _insensitive() 2021-06-25 00:22:01 +03:00
GDBRemote.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
IOObject.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
LLDBAssert.cpp [lldb] Include llvm-config.h instead of config.h 2021-03-29 08:58:51 -07:00
Listener.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
Log.cpp [lldb] Rename StringRef _lower() method calls to _insensitive() 2021-06-25 00:22:01 +03:00
Logging.cpp [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02: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 [lldb] Use C++11 default member initializers 2021-06-09 09:43:13 -07:00
RegisterValue.cpp [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02: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] Remove LLDB_CAPTURE_REPRODUCER override 2021-03-31 21:10:56 -07:00
ReproducerInstrumentation.cpp [lldb] Use C++11 default member initializers 2021-06-09 09:43:13 -07:00
ReproducerProvider.cpp [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text 2021-04-06 07:23:31 -04:00
Scalar.cpp [lldb] Fix compilation after removal of APInt::toString 2021-06-11 16:20:57 +02:00
SelectHelper.cpp [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
State.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
Status.cpp [lldb] Use C++11 default member initializers 2021-06-09 09:43:13 -07:00
Stream.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
StreamCallback.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
StreamString.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
StringExtractor.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
StringExtractorGDBRemote.cpp [lldb][AArch64] Add memory tag writing to lldb-server 2021-07-27 12:02:17 +01:00
StringLexer.cpp [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
StringList.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
StructuredData.cpp [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
TildeExpressionResolver.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
Timer.cpp Allow signposts to take advantage of deferred string substitution 2021-06-14 16:53:41 -07:00
TraceGDBRemotePackets.cpp [trace][intel-pt] Implement trace start and trace stop 2021-03-30 17:31:37 -07:00
TraceIntelPTGDBRemotePackets.cpp [intel pt] Add TSC timestamps 2021-07-20 16:29:17 -07:00
UUID.cpp [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
UnimplementedError.cpp [lldb/Utility] Introduce UnimplementedError 2020-10-12 13:46:17 +02:00
UriParser.cpp [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
UserID.cpp [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
UserIDResolver.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
UuidCompatibility.h
VASprintf.cpp [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
VMRange.cpp [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
XcodeSDK.cpp [lldb] Eliminate unneeded value parameters in Utility (NFC) 2020-07-22 13:56:23 -07:00