[Lldb-commits] [lldb] [lldb][dap] always add column field in StackFrame body (PR #73393)
Xu Jun via lldb-commits
lldb-commits at lists.llvm.org
Sat Nov 25 06:57:29 PST 2023
https://github.com/xujuntwt95329 created https://github.com/llvm/llvm-project/pull/73393
The `column` field is mandatory in StackTraceResponse, otherwise the debugger client may raise error (e.g. VSCode can't correctly open an editor without the column field)
>From 4621be9af9a8003c52850ed57ae7a24f26769b2c Mon Sep 17 00:00:00 2001
From: Xu Jun <693788454 at qq.com>
Date: Sat, 25 Nov 2023 22:52:53 +0800
Subject: [PATCH] [lldb][dap] always add column field in StackFrame body
Signed-off-by: Xu Jun <693788454 at qq.com>
---
lldb/tools/lldb-dap/JSONUtils.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lldb/tools/lldb-dap/JSONUtils.cpp b/lldb/tools/lldb-dap/JSONUtils.cpp
index 03a43f9da87f241..e65b05243df7066 100644
--- a/lldb/tools/lldb-dap/JSONUtils.cpp
+++ b/lldb/tools/lldb-dap/JSONUtils.cpp
@@ -817,8 +817,7 @@ llvm::json::Value CreateStackFrame(lldb::SBFrame &frame) {
if (line && line != LLDB_INVALID_LINE_NUMBER)
object.try_emplace("line", line);
auto column = line_entry.GetColumn();
- if (column && column != LLDB_INVALID_COLUMN_NUMBER)
- object.try_emplace("column", column);
+ object.try_emplace("column", column);
} else {
object.try_emplace("line", 0);
object.try_emplace("column", 0);
More information about the lldb-commits
mailing list