================
@@ -199,13 +200,24 @@ bool operator<(const SourceLoc lhs, const SourceLoc rhs) {
 }
 } // namespace
 
+static void
+ApplyLanguageFilters(llvm::SmallVectorImpl<SymbolContext> &sc_list) {
+  llvm::erase_if(sc_list, [](SymbolContext &sc) {
+    if (Language *lang = Language::FindPlugin(sc.GetLanguage()))
+      return !lang->IsInterestingCtxForLineBreakpoint(sc);
+    return false;
+  });
+}
+
 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 (uint32_t i = 0; i < sc_list.GetSize(); ++i)
     all_scs.push_back(sc_list[i]);
 
+  ApplyLanguageFilters(all_scs);
----------------
felipepiovezan wrote:

Yup, I'll change that in the next iteration of this patch (it was uploaded 
before Adrian's comment)

https://github.com/llvm/llvm-project/pull/83908
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to