[Lldb-commits] [lldb] [lldb-dap] Fix typo in StepInTarget serialization (PR #199907)
Sergei Druzhkov via lldb-commits
lldb-commits at lists.llvm.org
Wed May 27 02:08:59 PDT 2026
https://github.com/DrSergei created https://github.com/llvm/llvm-project/pull/199907
I fixed small typo and added test for that.
>From 54bedbe0e702abc40430397595e3e6d52ce3e0f0 Mon Sep 17 00:00:00 2001
From: Sergei Druzhkov <serzhdruzhok at gmail.com>
Date: Wed, 27 May 2026 10:59:13 +0300
Subject: [PATCH] [lldb-dap] Fix typo in StepInTarget serialization
---
lldb/tools/lldb-dap/Protocol/ProtocolTypes.cpp | 2 +-
lldb/unittests/DAP/ProtocolTypesTest.cpp | 12 ++++++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
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