[Lldb-commits] [lldb] [lldb-dap] Handle stack frames without a module (PR #136777)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Wed Apr 23 20:16:47 PDT 2025


================
@@ -783,6 +783,16 @@ llvm::json::Value CreateStackFrame(lldb::SBFrame &frame,
     // Line numbers are 1-based.
     object.try_emplace("line", inst_line + 1);
     object.try_emplace("column", 1);
+  } else {
+    // No valid line entry or symbol
+    llvm::json::Object source;
+    EmplaceSafeString(source, "name", frame_name);
+    source.try_emplace("sourceReference", MakeDAPFrameID(frame));
+    EmplaceSafeString(source, "presentationHint", "deemphasize");
+    object.try_emplace("source", std::move(source));
+
+    object.try_emplace("line", 1);
+    object.try_emplace("column", 1);
----------------
JDevlieghere wrote:

```suggestion
    object.try_emplace("line", LLDB_INVALID_LINE_NUMBER);
    object.try_emplace("column", LLDB_INVALID_LINE_NUMBER);
```

https://github.com/llvm/llvm-project/pull/136777


More information about the lldb-commits mailing list