Skip to content

Commit 99f42e6

Browse files
[lldb][dap] always add column field in StackFrame body (#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) --------- Signed-off-by: Xu Jun <[email protected]>
1 parent 40137ff commit 99f42e6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lldb/tools/lldb-dap/JSONUtils.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -748,9 +748,10 @@ llvm::json::Value CreateStackFrame(lldb::SBFrame &frame) {
748748
auto line = line_entry.GetLine();
749749
if (line && line != LLDB_INVALID_LINE_NUMBER)
750750
object.try_emplace("line", line);
751+
else
752+
object.try_emplace("line", 0);
751753
auto column = line_entry.GetColumn();
752-
if (column && column != LLDB_INVALID_COLUMN_NUMBER)
753-
object.try_emplace("column", column);
754+
object.try_emplace("column", column);
754755
} else {
755756
object.try_emplace("line", 0);
756757
object.try_emplace("column", 0);

0 commit comments

Comments
 (0)