This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 02/18] Remote all-stop-on-top-of-non-stop
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Yao Qi <qiyaoltc at gmail dot com>, gdb-patches at sourceware dot org
- Date: Thu, 26 Nov 2015 15:52:53 +0000
- Subject: Re: [PATCH 02/18] Remote all-stop-on-top-of-non-stop
- Authentication-results: sourceware.org; auth=none
- References: <1444836486-25679-1-git-send-email-palves at redhat dot com> <1444836486-25679-3-git-send-email-palves at redhat dot com> <86vb9x1u2h dot fsf at gmail dot com> <56533372 dot 3030805 at redhat dot com> <56535D4C dot 9030203 at redhat dot com>
Pedro Alves <palves@redhat.com> writes:
> diff --git i/gdb/remote.c w/gdb/remote.c
> index 1618ea1..624f60d 100644
> --- i/gdb/remote.c
> +++ w/gdb/remote.c
> @@ -13036,12 +13036,20 @@ remote_async (struct target_ops *ops, int enable)
> event loop to process them. */
> if (!QUEUE_is_empty (stop_reply_p, stop_reply_queue))
> mark_async_event_handler (remote_async_inferior_event_token);
> + /* For simplicity, below we clear the pending events token
> + without remembering whether it is marked, so here we always
> + mark it. If there's actually no pending notification to
> + process, this ends up being a no-op (other than a spurious
> + event-loop wakeup). */
> if (target_is_non_stop_p ())
> mark_async_event_handler (rs->notif_state->get_pending_events_token);
> }
> else
> {
> serial_async (rs->remote_desc, NULL, NULL);
> + /* If the core is disabling async, it doesn't want to be
> + disturbed with target events. Clear all async event sources
> + too. */
> clear_async_event_handler (remote_async_inferior_event_token);
> if (target_is_non_stop_p ())
> clear_async_event_handler (rs->notif_state->get_pending_events_token);
These comments are good to me.
--
Yao (éå)