From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22827 invoked by alias); 4 Feb 2016 13:55:06 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 22814 invoked by uid 89); 4 Feb 2016 13:55:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1416, 201508, nits X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 04 Feb 2016 13:55:05 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id DFA24C0ABF3F; Thu, 4 Feb 2016 13:55:03 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u14Dt2Yj028755; Thu, 4 Feb 2016 08:55:03 -0500 Message-ID: <56B35836.9000909@redhat.com> Date: Thu, 04 Feb 2016 13:55:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Yao Qi , gdb-patches@sourceware.org Subject: Re: [PATCH] waiting_for_stop_reply around remote_fileio_request References: <1454064546-4419-1-git-send-email-yao.qi@linaro.org> In-Reply-To: <1454064546-4419-1-git-send-email-yao.qi@linaro.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-02/txt/msg00109.txt.bz2 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