[Lldb-commits] [lldb] [lldb][dap] always add column field in StackFrame body (#73393) (PR #109531)
Gregory Ling via lldb-commits
lldb-commits at lists.llvm.org
Sat Sep 21 08:47:29 PDT 2024
https://github.com/glingy created https://github.com/llvm/llvm-project/pull/109531
None
>From 1d39760e03c78d7c5ef68d947f560dc00900078d Mon Sep 17 00:00:00 2001
From: Gregory Ling <17791817+glingy at users.noreply.github.com>
Date: Sat, 21 Sep 2024 10:47:05 -0500
Subject: [PATCH] Change error column response to 1 as VSCode expects
---
lldb/tools/lldb-dap/JSONUtils.cpp | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/lldb/tools/lldb-dap/JSONUtils.cpp b/lldb/tools/lldb-dap/JSONUtils.cpp
index 4f9c9c01cf4b6b..b4358ff9ebd2bf 100644
--- a/lldb/tools/lldb-dap/JSONUtils.cpp
+++ b/lldb/tools/lldb-dap/JSONUtils.cpp
@@ -769,10 +769,14 @@ llvm::json::Value CreateStackFrame(lldb::SBFrame &frame) {
else
object.try_emplace("line", 0);
auto column = line_entry.GetColumn();
- object.try_emplace("column", column);
+ if (column == 0)
+ object.try_emplace("column", 1);
+ else
+ object.try_emplace("column", column);
} else {
object.try_emplace("line", 0);
- object.try_emplace("column", 0);
+ // column indices start at 1 by default, column 0 is an invalid response
+ object.try_emplace("column", 1);
}
const auto pc = frame.GetPC();
More information about the lldb-commits
mailing list