This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 6/7] Cleanup pending queues before resume in all-stop
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 30 Nov 2012 18:20:18 +0000
- Subject: Re: [PATCH 6/7] Cleanup pending queues before resume in all-stop
- References: <1350991620-12950-1-git-send-email-yao@codesourcery.com> <1350991620-12950-7-git-send-email-yao@codesourcery.com>
On 10/23/2012 12:26 PM, Yao Qi wrote:
> In patch 3/N, we mark 'remote_async_get_pending_events_token'
> only in non-stop mode, and function 'remote_notif_process' is
> called in async event handler accordingly. In all-stop mode,
> we need to find a place to call 'remote_notif_process', I find
> it is reasonable to process them before resume inferior. So
> this is what this patch does.
Please expand on this, and eventually, that expansion should be
converted to a comment in the sources. All this ordering stuff
isn't obvious. E.g, start by explaining why can't we mark the
REMOTE_ASYNC_GET_PENDING_EVENTS_TOKEN token in all-stop. Take
inspiration from the comment on remote_notif_pending_replies.
>
> gdb:
>
> 2012-10-23 Yao Qi <yao@codesourcery.com>
>
> * remote.c (remote_resume): Call 'remote_notif_process' in
> all-stop mode.
> ---
> gdb/remote.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/gdb/remote.c b/gdb/remote.c
> index 7e9b373..1797af5 100644
> --- a/gdb/remote.c
> +++ b/gdb/remote.c
> @@ -4755,6 +4755,10 @@ remote_resume (struct target_ops *ops,
> struct remote_state *rs = get_remote_state ();
> char *buf;
>
> + /* Clean up pending queues before resume. */
> + if (!non_stop)
> + remote_notif_process ((struct notif *) ¬if_packet_stop);
> +
> last_sent_signal = siggnal;
> last_sent_step = step;
>
>
--
Pedro Alves