[Lldb-commits] [PATCH] D42195: [lldb] Generic base for testing gdb-remote behavior
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Feb 1 10:20:49 PST 2018
labath added a comment.
In https://reviews.llvm.org/D42195#995087, @clayborg wrote:
> I am pretty sure that the ack that gets sent should happen in response to getting an ACK. Note that LLDB send an ACK and then waits for an ACK. This helps us see if anything is there. So yes, this code can always just respond to an unsolicited ACK with an ACK.
LLDB sends an ACK, and then waits for anything. That "anything" can also be "nothing" (see `GDBRemoteCommunicationClient::HandshakeWithServer`). lldb-server currently does not respond to the initial ACK, which is good, because the length of the initial client wait (10ms) would mean this reply-ack would often get missed, and the connection would get out of sync (as this code demonstrated).
If we really want to have our servers send an initial ack, then we need to fix the client.
More information about the lldb-commits