[Lldb-commits] [lldb] [NFC][lldb-dap] Fix typo in invalidated event (PR #158338)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Sep 12 10:52:48 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Druzhkov Sergei (DrSergei)
<details>
<summary>Changes</summary>
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.
---
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
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));
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/158338
More information about the lldb-commits
mailing list