Skip to content

Commit c7da2d8

Browse files
committed
fallback to assembly when source code is not available
1 parent 839f521 commit c7da2d8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lldb/tools/lldb-dap/JSONUtils.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,9 +750,10 @@ llvm::json::Value CreateStackFrame(lldb::SBFrame &frame,
750750
EmplaceSafeString(object, "name", frame_name);
751751

752752
auto line_entry = frame.GetLineEntry();
753+
auto file_spec = line_entry.GetFileSpec();
753754
// A line entry of 0 indicates the line is compiler generated i.e. no source
754755
// file is associated with the frame.
755-
if (line_entry.GetFileSpec().IsValid() &&
756+
if (file_spec.IsValid() && file_spec.Exists() &&
756757
(line_entry.GetLine() != 0 ||
757758
line_entry.GetLine() != LLDB_INVALID_LINE_NUMBER)) {
758759
object.try_emplace("source", CreateSource(line_entry));

0 commit comments

Comments
 (0)