Author: Druzhkov Sergei Date: 2025-09-16T18:28:13Z New Revision: 90d96b3e9c90cccefe1c1af75b57de1b8e248c42
URL: https://github.com/llvm/llvm-project/commit/90d96b3e9c90cccefe1c1af75b57de1b8e248c42 DIFF: https://github.com/llvm/llvm-project/commit/90d96b3e9c90cccefe1c1af75b57de1b8e248c42.diff LOG: [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. Added: Modified: lldb/tools/lldb-dap/Protocol/ProtocolEvents.cpp lldb/tools/lldb-dap/Protocol/ProtocolEvents.h lldb/unittests/DAP/ProtocolTypesTest.cpp Removed: ################################################################################ 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 [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
