[Lldb-commits] [lldb] [lldb] Let languages see all SymbolContexts at once when filtering breakpoints (PR #129937)
Felipe de Azevedo Piovezan via lldb-commits
lldb-commits at lists.llvm.org
Wed Mar 5 13:03:26 PST 2025
================
@@ -207,16 +207,15 @@ bool operator<(const SourceLoc lhs, const SourceLoc rhs) {
void BreakpointResolver::SetSCMatchesByLine(
SearchFilter &filter, SymbolContextList &sc_list, bool skip_prologue,
llvm::StringRef log_ident, uint32_t line, std::optional<uint16_t> column) {
- llvm::SmallVector<SymbolContext, 16> all_scs;
-
- for (const auto &sc : sc_list) {
- if (Language::GetGlobalLanguageProperties()
- .GetEnableFilterForLineBreakpoints())
- if (Language *lang = Language::FindPlugin(sc.GetLanguage());
- lang && lang->IgnoreForLineBreakpoints(sc))
- continue;
- all_scs.push_back(sc);
- }
+ llvm::SmallVector<SymbolContext, 16> all_scs(sc_list.begin(), sc_list.end());
+
+ // Let the language plugin filter `sc_list`. Because all symbol contexts in
+ // sc_list are assumed to belong to the same File, Line and CU, the code below
+ // assumes they have the same language.
----------------
felipepiovezan wrote:
The assumption above comes from the docstring for `BreakpointResolver::SetSCMatchesByLine`
https://github.com/llvm/llvm-project/pull/129937
More information about the lldb-commits
mailing list