llvm-project/lldb/tools
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
..
argdumper [lldb] Remove a few unused .exports files 2021-08-05 22:17:00 +02:00
compact-unwind Don't re-define constants that are now in compact_unwind_encoding.h. 2021-09-09 17:01:43 -07:00
darwin-debug [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
darwin-threads
debugserver [debugserver] Remove varaible `ldb_set` which is set but not used. 2021-11-10 11:56:59 -08:00
driver Fixed use of -o and -k in LLDB under Windows when statically compiled with vcruntime. 2021-11-24 16:17:08 +00:00
intel-features [LLDB] Silence warnings in cli-wrapper-mpxtable.cpp 2021-06-28 02:36:14 +00:00
lldb-instr Adapt lldb-instr to d47ee525f9 APi change 2021-01-29 10:58:40 +01:00
lldb-server [lldb/gdb-remote] Ignore spurious ACK packets 2021-11-25 12:34:08 +01:00
lldb-test [lldb] Stop referencing "host_lib" in cmake files 2021-08-05 22:18:37 +02:00
lldb-vscode [lldb-vscode] Add presentation hints for scopes 2021-11-09 17:50:46 +01:00
CMakeLists.txt [CMake] Copy over the system debugserver when using LLDB_USE_SYSTEM_DEBUGSERVER 2019-09-24 22:39:04 +00:00