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

via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 15 14:52:27 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);
+      }
----------------
dlgus8648 wrote:

You're right, and thanks for pointing this out — I should have labeled these. I've been using Claude Code to help draft my review replies and parts of the code; the commits carry `Assisted-by: Claude Code (Anthropic)` trailers, but I should have flagged the comment replies as AI-assisted too. Going forward I'll write my replies myself and disclose any AI assistance.

For transparency: this reply was drafted with AI assistance and reviewed by me. I understand the changes and stand behind them. Thanks for keeping me honest on the policy, and for the review.


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


More information about the lldb-commits mailing list