https://github.com/eronnen updated 
https://github.com/llvm/llvm-project/pull/136494

>From c7da2d8281823d689b85bc836f3ed947857aaa32 Mon Sep 17 00:00:00 2001
From: Ely Ronnen <elyron...@gmail.com>
Date: Sun, 20 Apr 2025 17:07:09 +0200
Subject: [PATCH] fallback to assembly when source code is not available

---
 lldb/tools/lldb-dap/JSONUtils.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lldb/tools/lldb-dap/JSONUtils.cpp 
b/lldb/tools/lldb-dap/JSONUtils.cpp
index 33f10c93d2ada..1a44df7740639 100644
--- a/lldb/tools/lldb-dap/JSONUtils.cpp
+++ b/lldb/tools/lldb-dap/JSONUtils.cpp
@@ -750,9 +750,10 @@ llvm::json::Value CreateStackFrame(lldb::SBFrame &frame,
   EmplaceSafeString(object, "name", frame_name);
 
   auto line_entry = frame.GetLineEntry();
+  auto file_spec = line_entry.GetFileSpec();
   // A line entry of 0 indicates the line is compiler generated i.e. no source
   // file is associated with the frame.
-  if (line_entry.GetFileSpec().IsValid() &&
+  if (file_spec.IsValid() && file_spec.Exists() &&
       (line_entry.GetLine() != 0 ||
        line_entry.GetLine() != LLDB_INVALID_LINE_NUMBER)) {
     object.try_emplace("source", CreateSource(line_entry));

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

Reply via email to