[Lldb-commits] [lldb] 58156c2 - [lldb-dap] Fix typo in StepInTarget serialization (#199907)
via lldb-commits
lldb-commits at lists.llvm.org
Wed May 27 07:08:45 PDT 2026
Author: Sergei Druzhkov
Date: 2026-05-27T17:08:38+03:00
New Revision: 58156c21585ab05d7810666070020919342757bf
URL: https://github.com/llvm/llvm-project/commit/58156c21585ab05d7810666070020919342757bf
DIFF: https://github.com/llvm/llvm-project/commit/58156c21585ab05d7810666070020919342757bf.diff
LOG: [lldb-dap] Fix typo in StepInTarget serialization (#199907)
I fixed small typo and added test for that.
Added:
Modified:
lldb/tools/lldb-dap/Protocol/ProtocolTypes.cpp
lldb/unittests/DAP/ProtocolTypesTest.cpp
Removed:
################################################################################
diff --git a/lldb/tools/lldb-dap/Protocol/ProtocolTypes.cpp b/lldb/tools/lldb-dap/Protocol/ProtocolTypes.cpp
index 17e2b4b73f532..b70aeb661f3e1 100644
--- a/lldb/tools/lldb-dap/Protocol/ProtocolTypes.cpp
+++ b/lldb/tools/lldb-dap/Protocol/ProtocolTypes.cpp
@@ -745,7 +745,7 @@ llvm::json::Value toJSON(const StepInTarget &SIT) {
target.insert({"column", SIT.column});
if (SIT.endLine != LLDB_INVALID_LINE_NUMBER)
target.insert({"endLine", SIT.endLine});
- if (SIT.endLine != LLDB_INVALID_COLUMN_NUMBER)
+ if (SIT.endColumn != LLDB_INVALID_COLUMN_NUMBER)
target.insert({"endColumn", SIT.endColumn});
return target;
diff --git a/lldb/unittests/DAP/ProtocolTypesTest.cpp b/lldb/unittests/DAP/ProtocolTypesTest.cpp
index 56ef6cdbb813f..996b6e3ec6ba5 100644
--- a/lldb/unittests/DAP/ProtocolTypesTest.cpp
+++ b/lldb/unittests/DAP/ProtocolTypesTest.cpp
@@ -10,6 +10,7 @@
#include "Protocol/ProtocolEvents.h"
#include "Protocol/ProtocolRequests.h"
#include "TestingSupport/TestUtilities.h"
+#include "lldb/lldb-defines.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/JSON.h"
#include "llvm/Testing/Support/Error.h"
@@ -759,6 +760,17 @@ TEST(ProtocolTypesTest, StepInTarget) {
EXPECT_EQ(target.column, deserialized_target->column);
EXPECT_EQ(target.endLine, deserialized_target->endLine);
EXPECT_EQ(target.endColumn, deserialized_target->endColumn);
+
+ target.endLine = LLDB_INVALID_LINE_NUMBER;
+ target.endColumn = LLDB_INVALID_COLUMN_NUMBER;
+
+ EXPECT_EQ(R"({
+ "column": 320,
+ "id": 230,
+ "label": "the_function_name",
+ "line": 2
+})",
+ PrettyPrint(target));
}
TEST(ProtocolTypesTest, ReadMemoryArguments) {
More information about the lldb-commits
mailing list