llvm-project/lldb/unittests/Process/gdb-remote
David Spickett 555cd03193 [lldb] Correct format of qMemTags type field
The type field is a signed integer.
(https://sourceware.org/gdb/current/onlinedocs/gdb/General-Query-Packets.html)

However it's not packed in the packet in the way
you might think. For example the type -1 should be:
qMemTags:<addr>,<len>:ffffffff
Instead of:
qMemTags:<addr>,<len>:-1

This change makes lldb-server's parsing more strict
and adds more tests to check that we handle negative types
correctly in lldb and lldb-server.

We only support one tag type value at this point,
for AArch64 MTE, which is positive. So this doesn't change
any of those interactions. It just brings us in line with GDB.

Also check that the test target has MTE. Previously
we just checked that we were AArch64 with a toolchain
that supports MTE.

Finally, update the tag type check for QMemTags to use
the same conversion steps that qMemTags now does.
Using static_cast can invoke UB and though we do do a limit
check to avoid this, I think it's clearer with the new method.

Reviewed By: omjavaid

Differential Revision: https://reviews.llvm.org/D104914
2021-07-30 11:06:57 +01:00
..
CMakeLists.txt [lldb] Error when there are no ports to launch a gdbserver on 2020-11-30 10:19:14 +00:00
GDBRemoteClientBaseTest.cpp Revert "Revert "Reset the wakeup timeout when we re-enter the continue wait."" 2021-07-12 14:20:49 -07:00
GDBRemoteCommunicationClientTest.cpp [lldb] Correct format of qMemTags type field 2021-07-30 11:06:57 +01:00
GDBRemoteCommunicationServerTest.cpp [lldb/Utility] Introduce UnimplementedError 2020-10-12 13:46:17 +02:00
GDBRemoteCommunicationTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
GDBRemoteTestUtils.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
GDBRemoteTestUtils.h [lldb] Change Communication::SetConnection to take a unique_ptr 2020-04-02 14:42:25 +02:00
PortMapTest.cpp [lldb] Error when there are no ports to launch a gdbserver on 2020-11-30 10:19:14 +00:00