[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:57:58 PDT 2026


================
@@ -232,6 +232,24 @@ GDBRemoteCommunication::ReadPacket(StringExtractorGDBRemote &response,
   }
 }
 
+GDBRemoteCommunication::PacketType
+GDBRemoteCommunication::GetNextNonNotifyPacket(
+    const uint8_t *src, size_t src_len, StringExtractorGDBRemote &packet) {
+  // Async notification packets (e.g. OpenOCD's "oocd_keepalive", sent during
+  // long memory operations) are not responses to our request. GDB silently
+  // drops unknown notifications while waiting for a packet; do the same and
+  // keep looking for the actual response. After the freshly-read bytes are
+  // consumed, drain any further buffered packets from the cache.
----------------
felipepiovezan wrote:

> After the freshly-read bytes are
  // consumed, drain any further buffered packets from the cache.

Where does that happen in the code below?

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


More information about the lldb-commits mailing list