Skip to content

Conversation

DrSergei
Copy link
Contributor

Fixed a typo in the invalidated event according to DAP specification. While the field is frameId elsewhere, it must be stackFrameId in this event.

@llvmbot
Copy link
Member

llvmbot commented Sep 12, 2025

@llvm/pr-subscribers-lldb

Author: Druzhkov Sergei (DrSergei)

Changes

Fixed a typo in the invalidated event according to DAP specification. While the field is frameId elsewhere, it must be stackFrameId in this event.


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

3 Files Affected:

  • (modified) lldb/tools/lldb-dap/Protocol/ProtocolEvents.cpp (+2-2)
  • (modified) lldb/tools/lldb-dap/Protocol/ProtocolEvents.h (+1-1)
  • (modified) lldb/unittests/DAP/ProtocolTypesTest.cpp (+2-2)
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));
 }

@DrSergei
Copy link
Contributor Author

Failed tests are not related to changes.

Failed Tests (2):
    lldb-api :: commands/expression/import-std-module/vector-dbg-info-content/TestDbgInfoContentVectorFromStdModule.py
    lldb-api :: commands/expression/import-std-module/vector-of-vectors/TestVectorOfVectorsFromStdModule.py

@JDevlieghere JDevlieghere enabled auto-merge (squash) September 16, 2025 18:21
@JDevlieghere JDevlieghere merged commit 90d96b3 into llvm:main Sep 16, 2025
9 checks passed
JDevlieghere pushed a commit to swiftlang/llvm-project that referenced this pull request Oct 14, 2025
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.

(cherry picked from commit 90d96b3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants