================
@@ -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:
Done — extracted the loop into `GetNextNonNotifyPacket()` and moved the
explanatory comment onto it, so both call sites in `WaitForPacketNoLock()` are
now one-liners. No functional change; the full gdb-remote unit suite still
passes (45/45) and clang-format is clean. Thanks for the review!
https://github.com/llvm/llvm-project/pull/202556
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits