https://github.com/DrSergei created 
https://github.com/llvm/llvm-project/pull/158338

Fixed a typo in the `invalidated` event according to 
[DAP](https://microsoft.github.io/debug-adapter-protocol/specification#Events_Invalidated)
 specification. While the field is `frameId` elsewhere, it must be 
`stackFrameId` in this event.

>From da4574994f7d98454b7c1f224a3f4ef1d7a19384 Mon Sep 17 00:00:00 2001
From: Druzhkov Sergei <serzhdruz...@gmail.com>
Date: Fri, 12 Sep 2025 20:03:42 +0300
Subject: [PATCH] [NFC][lldb-dap] Fix typo in invalidated event

---
 lldb/tools/lldb-dap/Protocol/ProtocolEvents.cpp | 4 ++--
 lldb/tools/lldb-dap/Protocol/ProtocolEvents.h   | 2 +-
 lldb/unittests/DAP/ProtocolTypesTest.cpp        | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/lldb/tools/lldb-dap/Protocol/ProtocolEvents.cpp 
b/lldb/tools/lldb-dap/Protocol/ProtocolEvents.cpp
index 9598c69878d66..062b9494ec10f 100644
--- a/lldb/tools/lldb-dap/Protocol/ProtocolEvents.cpp
+++ b/lldb/tools/lldb-dap/Protocol/ProtocolEvents.cpp
@@ -51,8 +51,8 @@ llvm::json::Value toJSON(const InvalidatedEventBody &IEB) {
   json::Object Result{{"areas", IEB.areas}};
   if (IEB.threadId)
     Result.insert({"threadID", IEB.threadId});
-  if (IEB.frameId)
-    Result.insert({"frameId", IEB.frameId});
+  if (IEB.stackFrameId)
+    Result.insert({"stackFrameId", IEB.stackFrameId});
   return Result;
 }
 
diff --git a/lldb/tools/lldb-dap/Protocol/ProtocolEvents.h 
b/lldb/tools/lldb-dap/Protocol/ProtocolEvents.h
index 138b622e01210..cb976d3395217 100644
--- a/lldb/tools/lldb-dap/Protocol/ProtocolEvents.h
+++ b/lldb/tools/lldb-dap/Protocol/ProtocolEvents.h
@@ -83,7 +83,7 @@ struct InvalidatedEventBody {
 
   /// If specified, the client only needs to refetch data related to this stack
   /// frame (and the `threadId` is ignored).
-  std::optional<uint64_t> frameId;
+  std::optional<uint64_t> stackFrameId;
 };
 llvm::json::Value toJSON(const InvalidatedEventBody::Area &);
 llvm::json::Value toJSON(const InvalidatedEventBody &);
diff --git a/lldb/unittests/DAP/ProtocolTypesTest.cpp 
b/lldb/unittests/DAP/ProtocolTypesTest.cpp
index a964592495347..61d197a705e0e 100644
--- a/lldb/unittests/DAP/ProtocolTypesTest.cpp
+++ b/lldb/unittests/DAP/ProtocolTypesTest.cpp
@@ -1078,13 +1078,13 @@ TEST(ProtocolTypesTest, InvalidatedEventBody) {
   InvalidatedEventBody body;
   body.areas = {InvalidatedEventBody::eAreaStacks,
                 InvalidatedEventBody::eAreaThreads};
-  body.frameId = 1;
+  body.stackFrameId = 1;
   StringRef json = R"({
   "areas": [
     "stacks",
     "threads"
   ],
-  "frameId": 1
+  "stackFrameId": 1
 })";
   EXPECT_EQ(json, pp(body));
 }

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to