[Lldb-commits] [lldb] r364669 - [GDBRemote] Remove code that flushes GDB remote packets

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Fri Jun 28 11:14:28 PDT 2019

Author: jdevlieghere
Date: Fri Jun 28 11:14:27 2019
New Revision: 364669

URL: http://llvm.org/viewvc/llvm-project?rev=364669&view=rev
[GDBRemote] Remove code that flushes GDB remote packets

The arbitrary timeout when flushing GDB remote packets caused
non-determinism and flakiness between test runs. I suspect it is what's
causing the flakiness of the reproducer tests on GreenDragon, and want
to see if removing it causes that to go away.

This change was originally introduced in r197579 to discard a
`$T02thread:01;#4` that QEMU was sending. If anybody knows how to test
that this continues working after removing this code, I'd love to hear


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=364669&r1=364668&r2=364669&view=diff
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp Fri Jun 28 11:14:27 2019
@@ -115,13 +115,6 @@ 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