On 2025-05-19 14:22, Pedro Alves wrote: > While working on Windows non-stop support, I ran into a > very-hard-to-track-down bug. > ... > The patch adds getters/setters for both (user) state and > internal_state, and adds assertions around state transitions, ensuring > that internal_state doesn't get out of sync with > thread::have_pending_wait_status(). I've rebased this on current master and I've now merged it, after retesting on native and gdbserver linux. The rebase only required mechanical changes around thread_info pointer to thread_info references. > It also adds an assertion to > clear_proceed_status_thread, making sure that we don't try to proceed > a thread that is already running. Turns out that catches > attach_command calling init_wait_for_inferior too late, after > attaching has already created already-running threads. I've ended up splitting this part into a separate preparatory patch, to help with archaeology and bisecting if this ever creates a problem. I've attached the two patches as they were merged. Pedro Alves