[Lldb-commits] [lldb] [lldb] Ignore async notification packets while waiting for a response (PR #202556)

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Tue Jun 9 03:51:38 PDT 2026


================
@@ -258,7 +268,17 @@ GDBRemoteCommunication::WaitForPacketNoLock(StringExtractorGDBRemote &packet,
                      error, bytes_read);
 
     if (bytes_read > 0) {
-      if (CheckForPacket(buffer, bytes_read, packet) != PacketType::Invalid)
+      // Drop any async notification packets (see above) and keep waiting for
+      // the actual response. Once the freshly-read bytes have been consumed,
+      // re-check the cache for any further buffered packets.
----------------
DavidSpickett wrote:

The second sentence doesn't add anything, you can remove it. I think the while loop already implies we are checking again for new packets.

https://github.com/llvm/llvm-project/pull/202556


More information about the lldb-commits mailing list