[Lldb-commits] [lldb] Add `target modules dump separate-debug-info` (PR #66035)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Thu Sep 14 14:28:10 PDT 2023


================
@@ -459,6 +470,14 @@ class SymbolFile : public PluginInterface {
   virtual void GetCompileOptions(
       std::unordered_map<lldb::CompUnitSP, lldb_private::Args> &args) {}
 
+  /// If separate debug info files are supported and this function succeeded,
+  /// return some string representing the type of debug info. E.g. "dwo" or
+  /// "oso". Otherwise, this returns None.
+  virtual std::optional<ConstString>
----------------
clayborg wrote:

We should switch this API to look like:
```
virtual void GetSeparateDebugInfo(StructuredData::Dictionary &d);
```
The SymbolFile is not responsible for adding everything to the dictionary including "type", "symfile", and "separate-debug-info-files":
```
{ "type": "dwo", "symfile": "/tmp/a.out", "separate-debug-info-files": [ <array> ] }
```
Then you won't need to add this optional returned string into another dictionary or have someone else add the "symfile" above this call.

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


More information about the lldb-commits mailing list