[Lldb-commits] [lldb] [lldb] Remove incorrect eServerPacketType_notify (PR #203204)

via lldb-commits lldb-commits at lists.llvm.org
Thu Jun 11 02:06:35 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Tim Hutt (Timmmm)

<details>
<summary>Changes</summary>

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).

---
Full diff: https://github.com/llvm/llvm-project/pull/203204.diff


2 Files Affected:

- (modified) lldb/include/lldb/Utility/StringExtractorGDBRemote.h (-1) 
- (modified) lldb/source/Utility/StringExtractorGDBRemote.cpp (-3) 


``````````diff
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;

``````````

</details>


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


More information about the lldb-commits mailing list