Skip to content

Commit d9ab129

Browse files
xujuntwt95329JDevlieghere
authored andcommitted
[lldb][dap] always add column field in StackFrame body (llvm#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]> (cherry picked from commit 99f42e6)
1 parent 3fc9805 commit d9ab129

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
@@ -813,9 +813,10 @@ llvm::json::Value CreateStackFrame(lldb::SBFrame &frame) {
813813
auto line = line_entry.GetLine();
814814
if (line && line != LLDB_INVALID_LINE_NUMBER)
815815
object.try_emplace("line", line);
816+
else
817+
object.try_emplace("line", 0);
816818
auto column = line_entry.GetColumn();
817-
if (column && column != LLDB_INVALID_COLUMN_NUMBER)
818-
object.try_emplace("column", column);
819+
object.try_emplace("column", column);
819820
} else {
820821
object.try_emplace("line", 0);
821822
object.try_emplace("column", 0);

0 commit comments

Comments
 (0)