[Lldb-commits] [lldb] [DRAFT] Add support for inline DWARF source files. (PR #75880)

Adrian Prantl via lldb-commits lldb-commits at lists.llvm.org
Tue Dec 19 08:36:18 PST 2023


================
@@ -17,13 +17,40 @@
 namespace lldb_private {
 class Stream;
 
+/// Represents a source file whose contents is known (for example
+/// because it can be reconstructed from debug info), but that
+/// hasn't been written to a local disk yet.
+struct LazyFileSpec {
+  virtual ~LazyFileSpec() {}
+  virtual const FileSpec &Materialize() = 0;
+};
+
+/// Wraps either a FileSpec that represents a local file or a
+/// LazyFileSpec that could be materialized into a local file.
+class FileSpecHolder {
+  FileSpec m_file_spec;
+  std::shared_ptr<LazyFileSpec> m_lazy;
----------------
adrian-prantl wrote:

For the functions that want GetSpecOnly() (e.g., setting a breakpoint on the original filename) we still need it.

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


More information about the lldb-commits mailing list