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 <693788...@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 <693788...@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);

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to