Skip to content

Commit

Permalink
[lldb][SymbolFile] Report progress when calling FindTypes over object…
Browse files Browse the repository at this point in the history
… files in debug map
  • Loading branch information
Michael137 committed May 8, 2024
1 parent 99d505d commit 4fc71f1
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "lldb/Core/Module.h"
#include "lldb/Core/ModuleList.h"
#include "lldb/Core/PluginManager.h"
#include "lldb/Core/Progress.h"
#include "lldb/Core/Section.h"
#include "lldb/Host/FileSystem.h"
#include "lldb/Utility/RangeMap.h"
Expand Down Expand Up @@ -1240,7 +1241,13 @@ TypeSP SymbolFileDWARFDebugMap::FindCompleteObjCDefinitionTypeForDIE(
void SymbolFileDWARFDebugMap::FindTypes(const TypeQuery &query,
TypeResults &results) {
std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
Progress progress(
llvm::formatv("Searching for type '{0}'",
query.GetTypeBasename().AsCString("<<UNKNOWN>>")));
ForEachSymbolFile([&](SymbolFileDWARF *oso_dwarf) {
if (auto *obj = oso_dwarf->GetObjectFile())
progress.Increment(1, obj->GetFileSpec().GetPath());

oso_dwarf->FindTypes(query, results);
return results.Done(query) ? IterationAction::Stop
: IterationAction::Continue;
Expand Down

0 comments on commit 4fc71f1

Please sign in to comment.