This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] waiting_for_stop_reply around remote_fileio_request
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>, gdb-patches at sourceware dot org
- Date: Thu, 04 Feb 2016 13:55:02 +0000
- Subject: Re: [PATCH] waiting_for_stop_reply around remote_fileio_request
- Authentication-results: sourceware.org; auth=none
- References: <1454064546-4419-1-git-send-email-yao dot qi at linaro dot org>
On 01/29/2016 10:49 AM, Yao Qi wrote:
> however, we did set rs->waiting_for_stop_reply to zero before Luis's
> patch https://sourceware.org/ml/gdb-patches/2015-10/msg00336.html
>
> In fact, Luis's patch v1
> https://sourceware.org/ml/gdb-patches/2015-08/msg00809.html is about
> setting rs->waiting_for_stop_reply back to one after
> remote_fileio_request, which is correct. However during the review, the
> patch is changed and ends up with "not setting rs->waiting_for_stop_reply
> to zero".
Whoops...
LGTM, with nits below.
> diff --git a/gdb/remote.c b/gdb/remote.c
> index d5701e3..f396a8f 100644
> --- a/gdb/remote.c
> +++ b/gdb/remote.c
> @@ -6994,8 +6994,16 @@ remote_wait_as (ptid_t ptid, struct target_waitstatus *status, int options)
> status->value.sig = GDB_SIGNAL_0;
> break;
> case 'F': /* File-I/O request. */
> + /* GDB may access the inferior memory while handling the File-I/O
> + request, but we don't want it GDB accessing memory while waiting
Either "want it", or "want GDB", instead of "want it GDB".
> remote_fileio_request (buf, rs->ctrlc_pending_p);
> rs->ctrlc_pending_p = 0;
> + /* GDB handled the File-I/O request, but the target is running
> + again. Keep waiting for events. */
s/but/and/.
> + rs->waiting_for_stop_reply = 1;
> break;
> case 'N': case 'T': case 'S': case 'X': case 'W':
> {
Thanks,
Pedro Alves