[llvm-branch-commits] [lldb] [lldb] Implement delayed breakpoints (PR #192971)

Felipe de Azevedo Piovezan via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Apr 27 10:54:33 PDT 2026


================
@@ -3541,6 +3556,20 @@ void PruneThreadPlans();
   /// GetExtendedCrashInformation.
   StructuredData::DictionarySP m_crash_info_dict_sp;
 
+  struct DelayedBreakpointCache {
+    void Enqueue(lldb::BreakpointSiteSP site, BreakpointAction action);
+    void RemoveSite(lldb::BreakpointSiteSP site) {
+      m_site_to_action.erase(site);
+    }
+    void Clear() { m_site_to_action.clear(); }
+
+    std::map<lldb::BreakpointSiteSP, BreakpointAction> m_site_to_action;
----------------
felipepiovezan wrote:

Actually, we do. Iteration order must not depend on pointer values.
I wanted to use a `SetVector` here, but this data structure requires some boilerplate to work with shared pointers, and it also is not great when deletions are frequent (which we expect to be the case with breakpoints). I will add a custom comparison functor.

https://github.com/llvm/llvm-project/pull/192971


More information about the llvm-branch-commits mailing list