From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3969 invoked by alias); 3 Feb 2012 20:28:24 -0000 Received: (qmail 3955 invoked by uid 22791); 3 Feb 2012 20:28:23 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from elasmtp-dupuy.atl.sa.earthlink.net (HELO elasmtp-dupuy.atl.sa.earthlink.net) (209.86.89.62) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 03 Feb 2012 20:28:10 +0000 Received: from [70.170.59.51] (helo=macbook2.local) by elasmtp-dupuy.atl.sa.earthlink.net with esmtpa (Exim 4.67) (envelope-from ) id 1RtPjr-0006Dz-TT for gdb-patches@sourceware.org; Fri, 03 Feb 2012 15:28:07 -0500 Message-ID: <4F2C4350.6030000@earthlink.net> Date: Fri, 03 Feb 2012 20:28:00 -0000 From: Stan Shebs User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Re: (ping) Re: RFA: remote.c : allow long monitor cmds + allow user to C-c References: <1327265676.23561.25.camel@soleil> <4F1D5335.3090705@redhat.com> <1327350423.2215.6.camel@soleil> <1328220784.7612.5.camel@soleil> In-Reply-To: <1328220784.7612.5.camel@soleil> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ELNK-Trace: ae6f8838ff913eba0cc1426638a40ef67e972de0d01da940172c4d0cbb71c57539eb22f561e5a06a350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-IsSubscribed: yes 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 X-SW-Source: 2012-02/txt/msg00053.txt.bz2 On 2/2/12 2:13 PM, Philippe Waroquiers wrote: > On Tue, 2012-01-24 at 01:48 -0200, Sergio Durigan Junior wrote: > >> Some formatting nits. > Fixed in the updated patch below. > >> I know almost nothing about this part of the code, but as far as I have >> seen, the patch looks OK. I am not a maintainer, however. > RFA ping ? Looks reasonable to me, let's put it in. I don't suppose there's any easy way to make a testsuite test for it? Stan > > Thanks > > Philippe > > > Index: gdb/ChangeLog > =================================================================== > RCS file: /cvs/src/src/gdb/ChangeLog,v > retrieving revision 1.13804 > diff -u -p -r1.13804 ChangeLog > --- gdb/ChangeLog 2 Feb 2012 20:19:02 -0000 1.13804 > +++ gdb/ChangeLog 2 Feb 2012 22:05:35 -0000 > @@ -1,3 +1,8 @@ > +2012-02-02 Philippe Waroquiers > + > + * remote.c (remote_rcmd): Use getpkt_sane to detect timeout > + and continue the loop. Add QUIT statement. > + > 2012-02-02 Doug Evans > > * blockframe.c (find_pc_partial_function_gnu_ifunc): Change type of > Index: gdb/remote.c > =================================================================== > RCS file: /cvs/src/src/gdb/remote.c,v > retrieving revision 1.481 > diff -u -p -r1.481 remote.c > --- gdb/remote.c 2 Feb 2012 18:04:29 -0000 1.481 > +++ gdb/remote.c 2 Feb 2012 22:05:36 -0000 > @@ -8590,8 +8590,17 @@ remote_rcmd (char *command, > char *buf; > > /* XXX - see also remote_get_noisy_reply(). */ > + QUIT; /* Allow user to bail out with ^C. */ > rs->buf[0] = '\0'; > - getpkt (&rs->buf,&rs->buf_size, 0); > + if (getpkt_sane (&rs->buf,&rs->buf_size, 0) == -1) > + { > + /* Timeout. Continue to (try to) read responses. > + This is better than stopping with an error, assuming the stub > + is still executing the (long) monitor command. > + If needed, the user can interrupt gdb using C-c, obtaining > + an effect similar to stop on timeout. */ > + continue; > + } > buf = rs->buf; > if (buf[0] == '\0') > error (_("Target does not support this command.")); > > > > > > > >