barsolo2000 wrote: @jimingham I made some changes so please take a look. 1. my initial cleanup approach was wrong, the cleanup cleared the deferred state and the tracking map at the top of WillResume() to prevent stale state across stops. But it didn't recompute, so incomplete batch threads lost their deferred flag and each individually re-enabled the breakpoint. Instead added a re-computation step right after the cleanup, it scans existing StepOverBreakpoint plans, groups them by address, and re-sets deferred + re-registers for groups > 1.
2. Added GetKind guard. 3. Added the batched vCont optimization: when multiple threads are grouped at the same breakpoint, instead of stepping one at a time, they're all stepped in a single packet also adds found_run_before_public_stop to skip batching when the scan exits early for a priority thread. 4. looking at packets I saw an issue with (3), on the first cycle we would batch 10 threads correctly -> server stops after some complete. Then the second cycle kicks in willResume(), the remaining threads still ahve their StepOverBreakpoint plans from cycle 1 (since their PC didn't move yet), The StopOthers loop scans all threads. It finds one of the remaining and its StepOverBreakpoint plan returns StopOthers()=true --> so it sets thread_to_run. Because thread_to_run is set, we take the IF (thread_to_run) branch, which handles a single thread. The else branch, where all the batching logic lives, is never entered. I fixed it by skipping StepOverBreakpoint plans in the StopOthers loop so thread_to_run stays null and we fall into the else branch. Inside the else branch, SetupToStepOverBreakpointIfNeeded() returns false for these threads because they already have the plan. So the existing loop doesn't see them. The else clause catches them and adds them to breakpoint_groups, where they get re-batched into another multi-thread vCont. https://github.com/llvm/llvm-project/pull/180101 _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
