================
@@ -425,6 +425,11 @@ class SymbolFile : public PluginInterface {
   /// Reset the statistics for the symbol file.
   virtual void ResetStatistics() {}
 
+  /// Get the number of loaded DWO files for this symbol file.
+  /// This is used for statistics gathering and will return 0 for most
+  /// symbol file implementations except DWARF symbol files.
+  virtual uint32_t GetLoadedDwoFileCount() const { return 0; }
----------------
qxy11 wrote:

Thanks for the reference! In `GetSeparateDebugInfo` 
[here](https://github.com/llvm/llvm-project/blob/d882670d498a29f4e02f357ef9fe07c43de034c8/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp#L4185),
 the call to `GetDwoSymbolFile` ends up loading all DWO files (even if they 
weren't already loaded). I think it'd work if we set the `load_all_debug_info` 
to false in the call and do `GetDwoSymbolFile(false)`, in which case we'd have 
to add an extra `load_all_debug_info` argument to `GetSeparateDebugInfo` as 
well so that other existing use cases for GetSeparateDebugInfo don't get 
effected. I can try that instead of adding the new overload.

https://github.com/llvm/llvm-project/pull/144424
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to