Re: [PATCH v2 31/47] Windows gdb+gdbserver: Eliminate struct pending_stop

Tom Tromey
2025-05-28T19:37:11Z

>>>>> "Pedro" == Pedro Alves <pedro@palves.net> writes:

Pedro> After the previous patches, struct pending_stop only contains one
Pedro> field. So move that field into the windows_thread_info structure
Pedro> directly, and eliminate struct pending_stop.

Nice, thanks.

Pedro> @@ -112,8 +102,11 @@ struct windows_thread_info
Pedro> effect of trying to single step thread A -- leaving all other
Pedro> threads suspended -- and then seeing a stop in thread B. To handle
Pedro> this scenario, we queue all such "pending" stops here, and then
Pedro> - process them once the step has completed. See PR gdb/22992. */
Pedro> - struct pending_stop pending_stop {};
Pedro> + process them once the step has completed. See PR gdb/22992.
Pedro> +
Pedro> + TARGET_WAITKIND_IGNORE if the thread does not have a pending
Pedro> + stop. */
Pedro> + target_waitstatus pending_status;

I think this comment needs a minor update. There's no longer a queue of
pending stops, just a single potential pending stop per thread. And, I
suppose now the thread's last-event object has the relevant information
about the pending stop, so maybe the comment could mention that as well.
(I mean, I suppose it should be obvious from the context but it doesn't
hurt to be explicit.)

With that update, though:
Approved-By: Tom Tromey <tom@tromey.com>

Tom