From: Stan Shebs <stanshebs@earthlink.net>
To: gdb-patches@sourceware.org
Subject: Re: (ping) Re: RFA: remote.c : allow long monitor cmds + allow user to C-c
Date: Fri, 03 Feb 2012 20:28:00 -0000 [thread overview]
Message-ID: <4F2C4350.6030000@earthlink.net> (raw)
In-Reply-To: <1328220784.7612.5.camel@soleil>
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<philippe.waroquiers@skynet.be>
> +
> + * remote.c (remote_rcmd): Use getpkt_sane to detect timeout
> + and continue the loop. Add QUIT statement.
> +
> 2012-02-02 Doug Evans<dje@google.com>
>
> * 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."));
>
>
>
>
>
>
>
>
next prev parent reply other threads:[~2012-02-03 20:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-23 9:42 Philippe Waroquiers
2012-01-23 12:43 ` Pedro Alves
2012-01-23 21:09 ` Philippe Waroquiers
2012-01-24 4:43 ` Sergio Durigan Junior
2012-01-24 4:52 ` Philippe Waroquiers
2012-02-02 22:13 ` (ping) " Philippe Waroquiers
2012-02-03 20:28 ` Stan Shebs [this message]
2012-02-03 22:39 ` Philippe Waroquiers
2012-02-06 19:38 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F2C4350.6030000@earthlink.net \
--to=stanshebs@earthlink.net \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox