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

Felipe de Azevedo Piovezan via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 15 07:26:26 PDT 2026


================
@@ -258,7 +268,16 @@ 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.
+      packet_type = CheckForPacket(buffer, bytes_read, packet);
+      while (packet_type == PacketType::Notify) {
+        LLDB_LOGF(log,
+                  "GDBRemoteCommunication::%s ignoring notification packet",
+                  __FUNCTION__);
+        packet_type = CheckForPacket(nullptr, 0, packet);
+      }
----------------
felipepiovezan wrote:

This comment reads a lot like the usual Claude reply. I would like to point out that our AI usage policy includes comment replies.

> This policy includes, but is not limited to, the following kinds of contributions:
Code, usually in the form of a pull request
RFCs or design proposals
Issues or security vulnerabilities
**Comments and feedback on pull requests**

Please indicate whenever a comment was not written by yourself.
https://llvm.org/docs/AIToolPolicy.html

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


More information about the lldb-commits mailing list