[Lldb-commits] [lldb] r364722 - Revert "[GDBRemote] Remove code that flushes GDB remote packets"
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Sun Jun 30 12:00:09 PDT 2019
Author: jdevlieghere
Date: Sun Jun 30 12:00:09 2019
New Revision: 364722
URL: http://llvm.org/viewvc/llvm-project?rev=364722&view=rev
Log:
Revert "[GDBRemote] Remove code that flushes GDB remote packets"
Reverting this again as it doesn't appear to solve the flakiness on the
LLDB standalone bot.
Modified:
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp?rev=364722&r1=364721&r2=364722&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp Sun Jun 30 12:00:09 2019
@@ -115,6 +115,13 @@ bool GDBRemoteCommunicationClient::Hands
// Start the read thread after we send the handshake ack since if we fail to
// send the handshake ack, there is no reason to continue...
if (SendAck()) {
+ // Wait for any responses that might have been queued up in the remote
+ // GDB server and flush them all
+ StringExtractorGDBRemote response;
+ PacketResult packet_result = PacketResult::Success;
+ while (packet_result == PacketResult::Success)
+ packet_result = ReadPacket(response, milliseconds(10), false);
+
// The return value from QueryNoAckModeSupported() is true if the packet
// was sent and _any_ response (including UNIMPLEMENTED) was received), or
// false if no response was received. This quickly tells us if we have a
More information about the lldb-commits
mailing list