================
@@ -597,6 +631,41 @@ bool ThreadList::WillResume(RunDirection &direction) {
         }
       }
     }
+
+    // For each group of threads at the same breakpoint, register them with
+    // ThreadList and set them to use deferred re-enable. The breakpoint will
+    // only be re-enabled when ALL threads have finished stepping over it.
+    // Also collect threads for batched vCont if multiple threads at same BP.
+    for (auto &group : breakpoint_groups) {
+      lldb::addr_t bp_addr = group.first;
+      std::vector<ThreadSP> &threads = group.second;
+
+      if (threads.size() > 1) {
+        // Multiple threads stepping over the same breakpoint - use tracking
+        for (ThreadSP &thread_sp : threads) {
+          // Register this thread as stepping over the breakpoint
+          RegisterThreadSteppingOverBreakpoint(bp_addr, thread_sp->GetID());
+
+          // Set the plan to defer re-enabling (use callback instead)
+          ThreadPlan *plan = thread_sp->GetCurrentPlan();
+          ThreadPlanStepOverBreakpoint *bp_plan =
----------------
jimingham wrote:

This should have a check that the Kind is ePlanKindSteppingOverBreakpoint(sp?). 
 By your computations nothing on this list should have a different thread plan, 
but you want to make sure somebody doesn't inadvertently push another plan or 
whatever in a future change.

https://github.com/llvm/llvm-project/pull/180101
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to