RFA: remote.c : allow long monitor cmds + allow user to C-c
Sergio Durigan Junior
sergiodj@redhat.com
Tue Jan 24 04:43:00 GMT 2012
Hello Philippe,
Thanks for the patch. Do you have copyright assignment?
Some formatting nits.
On Monday, January 23 2012, Philippe Waroquiers wrote:
> On Mon, 2012-01-23 at 12:31 +0000, Pedro Alves wrote:
>> Please use "cvs diff -up", or put "diff -up" in your ~/.cvsrc file.
> Oops, 2nd trial.
>
> Index: gdb/ChangeLog
> ===================================================================
> RCS file: /cvs/src/src/gdb/ChangeLog,v
> retrieving revision 1.13761
> diff -u -p -r1.13761 ChangeLog
> --- gdb/ChangeLog 20 Jan 2012 10:31:25 -0000 1.13761
> +++ gdb/ChangeLog 23 Jan 2012 20:22:22 -0000
> @@ -1,3 +1,8 @@
> +2012-01-22 Philippe Waroquiers <philippe.waroquiers@skynet.be>
> +
> + * remote.c (remote_rcmd): use getpkt_sane to detect timeout
> + and continue the loop. Add QUIT statement.
First letter shall be uppercase. Two spaces after period, before
beginning a new sentence. The date must also be updated if/when you
commit.
> Index: gdb/remote.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/remote.c,v
> retrieving revision 1.478
> diff -u -p -r1.478 remote.c
> --- gdb/remote.c 20 Jan 2012 09:47:32 -0000 1.478
> +++ gdb/remote.c 23 Jan 2012 20:22:24 -0000
> 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;
> + }
Same formatting issues here in this comment: two spaces after period.
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.
--
Sergio
More information about the Gdb-patches
mailing list