================ @@ -105,6 +105,21 @@ protocol::Source CreateSource(lldb::SBAddress address, lldb::SBTarget &target) { return CreateSource(line_entry.GetFileSpec()); } +protocol::Source CreateSource(lldb::SBFrame frame) { + if (!frame.IsValid()) + return {}; ---------------- ashgti wrote:
I think we should make this function return an `std::optional<protocol::Source>` as I think this should only be set if the source is valid. The source should have at least `path` and/or `sourceReference` set. https://github.com/llvm/llvm-project/pull/143644 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits