[Lldb-commits] [lldb] [lldb][DWARF] Search for symbols in all external modules (PR #75927)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Wed Dec 20 01:58:53 PST 2023
https://github.com/DavidSpickett updated https://github.com/llvm/llvm-project/pull/75927
>From a7770da9e2a997eefced82b9ebb305b464fec70d Mon Sep 17 00:00:00 2001
From: David Spickett <david.spickett at linaro.org>
Date: Tue, 19 Dec 2023 12:46:54 +0000
Subject: [PATCH] [lldb][DWARF] Searchfor symbols in all external modules
The way this code was updated in dd9587795811ba21e6ca6ad52b4531e17e6babd6
meant that if the first module did not have the symbol, the iteration stopped
as returning true means stop. So only if every module had the symbol would we find it,
in the last module.
Invert the condition to break when we find the first instance,
which is what the previous code did.
---
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
index 334876620249fc..3e08f2550081f2 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -175,7 +175,7 @@ TypeSP DWARFASTParserClang::ParseTypeFromClangModule(const SymbolContext &sc,
*sc.comp_unit, results.GetSearchedSymbolFiles(), [&](Module &module) {
module.FindTypes(query, results);
pcm_type_sp = results.GetTypeMap().FirstType();
- return !pcm_type_sp;
+ return (bool)pcm_type_sp;
});
}
More information about the lldb-commits
mailing list