Skip to content

SymbolFileDWARFDebugMap::FindTypes only finds types defined in the first compile unit #87176

Closed
@pabusse

Description

@pabusse

The early-exit condition inside SymbolFileDWARFDebugMap::FindTypes is inverted:

void SymbolFileDWARFDebugMap::FindTypes(const TypeQuery &query,
                                        TypeResults &results) {
  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
  ForEachSymbolFile([&](SymbolFileDWARF *oso_dwarf) -> bool {
    oso_dwarf->FindTypes(query, results);
    return !results.Done(query); // Keep iterating if we aren't done.
  });
}

ForEachSymbolFile stops iterating when the closure returns true. As a result, type queries only consider the first compile unit in a module.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions