[Lldb-commits] [lldb] [lldb] Emit progress events in SymbolFileDWARFDebugMap (PR #133211)
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Thu Mar 27 09:19:15 PDT 2025
================
@@ -924,59 +947,63 @@ void SymbolFileDWARFDebugMap::FindGlobalVariables(
std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
uint32_t total_matches = 0;
- ForEachSymbolFile([&](SymbolFileDWARF *oso_dwarf) {
- const uint32_t old_size = variables.GetSize();
- oso_dwarf->FindGlobalVariables(name, parent_decl_ctx, max_matches,
- variables);
- const uint32_t oso_matches = variables.GetSize() - old_size;
- if (oso_matches > 0) {
- total_matches += oso_matches;
-
- // Are we getting all matches?
- if (max_matches == UINT32_MAX)
- return IterationAction::Continue; // Yep, continue getting everything
-
- // If we have found enough matches, lets get out
- if (max_matches >= total_matches)
- return IterationAction::Stop;
-
- // Update the max matches for any subsequent calls to find globals in any
- // other object files with DWARF
- max_matches -= oso_matches;
- }
+ ForEachSymbolFile(
+ "Looking up global variables", [&](SymbolFileDWARF *oso_dwarf) {
+ const uint32_t old_size = variables.GetSize();
+ oso_dwarf->FindGlobalVariables(name, parent_decl_ctx, max_matches,
+ variables);
+ const uint32_t oso_matches = variables.GetSize() - old_size;
+ if (oso_matches > 0) {
+ total_matches += oso_matches;
+
+ // Are we getting all matches?
+ if (max_matches == UINT32_MAX)
+ return IterationAction::Continue; // Yep, continue getting
----------------
adrian-prantl wrote:
```suggestion
// Yep, continue getting everything.
return IterationAction::Continue;
```
https://github.com/llvm/llvm-project/pull/133211
More information about the lldb-commits
mailing list