llvm-project/lldb/unittests/Process
Pavel Labath 165545c7a4 [lldb/gdb-remote] Ignore spurious ACK packets
Although I cannot find any mention of this in the specification, both
gdb and lldb agree on sending an initial + packet after establishing the
connection.

OTOH, gdbserver and lldb-server behavior is subtly different. While
lldb-server *expects* the initial ack, and drops the connection if it is
not received, gdbserver will just ignore a spurious ack at _any_ point
in the connection.

This patch changes lldb's behavior to match that of gdb. An ACK packet
is ignored at any point in the connection (except when expecting an ACK
packet, of course). This is inline with the "be strict in what you
generate, and lenient in what you accept" philosophy, and also enables
us to remove some special cases from the server code. I've extended the
same handling to NAK (-) packets, mainly because I don't see a reason to
treat them differently here.

(The background here is that we had a stub which was sending spurious
+ packets. This bug has since been fixed, but I think this change makes
sense nonetheless.)

Differential Revision: https://reviews.llvm.org/D114520
2021-11-25 12:34:08 +01:00
..
Linux [trace][intel-pt] Implement trace start and trace stop 2021-03-30 17:31:37 -07:00
POSIX [lldb] Use modern CMake to avoid repetition (NFC) 2020-08-10 22:29:40 -07:00
Utility [lldb] Move DynamicRegisterInfo to public Target library 2021-10-05 12:40:55 +02:00
gdb-remote [lldb/gdb-remote] Ignore spurious ACK packets 2021-11-25 12:34:08 +01:00
minidump [NFC] Inclusive language: Remove instances of master in URLs 2021-11-05 08:48:41 -05:00
CMakeLists.txt [lldb] [Process/FreeBSDRemote] Access GPR via reginfo offsets 2020-11-16 12:19:37 +01:00
ProcessEventDataTest.cpp [lldb] Return StringRef from PluginInterface::GetPluginName 2021-10-18 10:14:42 +02:00