[Lldb-commits] [lldb] [lldb][dap] always add column field in StackFrame body (PR #73393)
via lldb-commits
lldb-commits at lists.llvm.org
Sat Nov 25 06:57:54 PST 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Xu Jun (xujuntwt95329)
<details>
<summary>Changes</summary>
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)
---
Full diff: https://github.com/llvm/llvm-project/pull/73393.diff
1 Files Affected:
- (modified) lldb/tools/lldb-dap/JSONUtils.cpp (+1-2)
``````````diff
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);
``````````
</details>
https://github.com/llvm/llvm-project/pull/73393
More information about the lldb-commits
mailing list