https://github.com/Timmmm created https://github.com/llvm/llvm-project/pull/203204
This enum is not correct. gdb-remote divides packets into normal packets and notifications: * Normal: `$content#checksum` * Notification: `%content#checksum` The `StringExtractorGDBRemote` only receives the `content` part, which does not contain anything to indicate if the packet is a notification or not. That information is in the return code of `GDBRemoteCommunication::CheckForPacket` which is currently thrown away (so LLDB does not handle notifications correctly at the moment). >From 8588f5180a46b11ab79b9e383f1c42d7c497bfa2 Mon Sep 17 00:00:00 2001 From: Tim Hutt <[email protected]> Date: Mon, 18 May 2026 10:14:02 +0100 Subject: [PATCH] [lldb] Remove incorrect eServerPacketType_notify This enum is not correct. gdb-remote divides packets into normal packets and notifications: * Normal: `$content#checksum` * Notification: `%content#checksum` The `StringExtractorGDBRemote` only receives the `content` part, which does not contain anything to indicate if the packet is a notification or not. That information is in the return code of `GDBRemoteCommunication::CheckForPacket` which is currently thrown away (so LLDB does not handle notifications correctly at the moment). --- lldb/include/lldb/Utility/StringExtractorGDBRemote.h | 1 - lldb/source/Utility/StringExtractorGDBRemote.cpp | 3 --- 2 files changed, 4 deletions(-) diff --git a/lldb/include/lldb/Utility/StringExtractorGDBRemote.h b/lldb/include/lldb/Utility/StringExtractorGDBRemote.h index 624a2febe857e..602a43be412d0 100644 --- a/lldb/include/lldb/Utility/StringExtractorGDBRemote.h +++ b/lldb/include/lldb/Utility/StringExtractorGDBRemote.h @@ -166,7 +166,6 @@ class StringExtractorGDBRemote : public StringExtractor { eServerPacketType__M, eServerPacketType__m, - eServerPacketType_notify, // '%' notification eServerPacketType_jLLDBTraceSupported, eServerPacketType_jLLDBTraceStart, diff --git a/lldb/source/Utility/StringExtractorGDBRemote.cpp b/lldb/source/Utility/StringExtractorGDBRemote.cpp index 6fc3b63e02dd1..bf899088abed1 100644 --- a/lldb/source/Utility/StringExtractorGDBRemote.cpp +++ b/lldb/source/Utility/StringExtractorGDBRemote.cpp @@ -67,9 +67,6 @@ StringExtractorGDBRemote::GetServerPacketType() const { const char *packet_cstr = m_packet.c_str(); switch (m_packet[0]) { - case '%': - return eServerPacketType_notify; - case '\x03': if (packet_size == 1) return eServerPacketType_interrupt; _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
