aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
diff options
context:
space:
mode:
authorPablo Busse <Pablo.Busse@microsoft.com>2024-03-31 09:17:32 -0700
committerGitHub <noreply@github.com>2024-03-31 17:17:32 +0100
commit154cea46732f4014bb409f1bcac9b39ac56df193 (patch)
treef5a8eaa86f7cdba75006341dd44fe5be049a6cec /lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
parent45f5fa2925142edf9a3d1648fac6c1f80b360175 (diff)
downloadllvm-154cea46732f4014bb409f1bcac9b39ac56df193.zip
llvm-154cea46732f4014bb409f1bcac9b39ac56df193.tar.gz
llvm-154cea46732f4014bb409f1bcac9b39ac56df193.tar.bz2
[lldb] Fix type lookup in DWARF .o files via debug map (#87177)
An inverted condition causes `SymbolFileDWARFDebugMap::FindTypes` to bail out after inspecting the first .o file in each module. The same kind of bug is found in `SymbolFileDWARFDebugMap::ParseDeclsForContext`. Correct both early exit conditions and add a regression test for lookup of up a type defined in a secondary compilation unit. Fixes #87176
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp')
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
index 6dd3eb3..4bc2cfd 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
@@ -1233,7 +1233,7 @@ void SymbolFileDWARFDebugMap::FindTypes(const TypeQuery &query,
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.
+ return results.Done(query); // Keep iterating if we aren't done.
});
}
@@ -1391,7 +1391,7 @@ void SymbolFileDWARFDebugMap::ParseDeclsForContext(
lldb_private::CompilerDeclContext decl_ctx) {
ForEachSymbolFile([&](SymbolFileDWARF *oso_dwarf) -> bool {
oso_dwarf->ParseDeclsForContext(decl_ctx);
- return true; // Keep iterating
+ return false; // Keep iterating
});
}