[Lldb-commits] [lldb] [lldb][split-dwarf] Add --errors-only argument separate-debug-info list (PR #71000)

Tom Yang via lldb-commits lldb-commits at lists.llvm.org
Wed Nov 1 23:36:10 PDT 2023


================
@@ -445,7 +445,11 @@ class SymbolFile : public PluginInterface {
   ///     contains the keys "type", "symfile", and "separate-debug-info-files".
   ///     "type" can be used to assume the structure of each object in
   ///     "separate-debug-info-files".
-  virtual bool GetSeparateDebugInfo(StructuredData::Dictionary &d) {
+  /// \param errors_only
+  ///     If true, then only return separate debug info files that encountered
+  ///     errors during loading.
+  virtual bool GetSeparateDebugInfo(StructuredData::Dictionary &d,
+                                    bool errors_only) {
----------------
zhyty wrote:

> Not sure I'm a fan of a parameter that changes behavior. Why not introduce a new function entirely?

Hmm... I was thinking it would save some lines of boilerplate and avoid adding a new function to `SymbolFile`'s API. Also, it seems to me that there are other functions in `SymbolFile` that have a similar pattern?
```
virtual void FindFunctions(const Module::LookupInfo &lookup_info,
                             const CompilerDeclContext &parent_decl_ctx,
                             bool include_inlines, SymbolContextList &sc_list);
...
  virtual CompilerDeclContext
  FindNamespace(ConstString name, const CompilerDeclContext &parent_decl_ctx,
                bool only_root_namespaces = false) {
    return CompilerDeclContext();
  }
...
```

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


More information about the lldb-commits mailing list