Skip to content

Commit 90d96b3

Browse files
authored
[NFC][lldb-dap] Fix typo in invalidated event (#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.
1 parent fd59fd5 commit 90d96b3

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

lldb/tools/lldb-dap/Protocol/ProtocolEvents.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ llvm::json::Value toJSON(const InvalidatedEventBody &IEB) {
5151
json::Object Result{{"areas", IEB.areas}};
5252
if (IEB.threadId)
5353
Result.insert({"threadID", IEB.threadId});
54-
if (IEB.frameId)
55-
Result.insert({"frameId", IEB.frameId});
54+
if (IEB.stackFrameId)
55+
Result.insert({"stackFrameId", IEB.stackFrameId});
5656
return Result;
5757
}
5858

lldb/tools/lldb-dap/Protocol/ProtocolEvents.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ struct InvalidatedEventBody {
8383

8484
/// If specified, the client only needs to refetch data related to this stack
8585
/// frame (and the `threadId` is ignored).
86-
std::optional<uint64_t> frameId;
86+
std::optional<uint64_t> stackFrameId;
8787
};
8888
llvm::json::Value toJSON(const InvalidatedEventBody::Area &);
8989
llvm::json::Value toJSON(const InvalidatedEventBody &);

lldb/unittests/DAP/ProtocolTypesTest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,13 +1078,13 @@ TEST(ProtocolTypesTest, InvalidatedEventBody) {
10781078
InvalidatedEventBody body;
10791079
body.areas = {InvalidatedEventBody::eAreaStacks,
10801080
InvalidatedEventBody::eAreaThreads};
1081-
body.frameId = 1;
1081+
body.stackFrameId = 1;
10821082
StringRef json = R"({
10831083
"areas": [
10841084
"stacks",
10851085
"threads"
10861086
],
1087-
"frameId": 1
1087+
"stackFrameId": 1
10881088
})";
10891089
EXPECT_EQ(json, pp(body));
10901090
}

0 commit comments

Comments
 (0)