This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: remote.c patch
- To: Quality Quorum <qqi at world dot std dot com>
- Subject: Re: remote.c patch
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Mon, 06 Dec 1999 22:53:47 +1100
- CC: gdb at sourceware dot cygnus dot com
- Organization: Cygnus Solutions
- References: <Pine.SGI.3.95.991204145527.3680A-200000@world.std.com>
Quality Quorum wrote:
>
> Hi,
>
> I got this patch attached, I made it against latest snapshot I have
> (gdb-19990913).
>
> Now a few related comments:
>
> 1. I used gdbserver to test remote target.
>
> a. It is not part of default compilation on my Linux RH5.2.
>
> b. It did not compile.
>
> c. It was quite painful to make it work. I can clean it up too, if
> necessary, howver, I do not have access to anything but Linux RH5.2
> and FreeBSD 3.2.
>
Thanks for this, it's going to take some time to look it over but yes,
some of the things are bugs. Not checking that a Z packet continues to
be supported, for instance, is definitly a bug.
Andrew
Just FYI,
> ***************
> *** 4385,4393 ****
> if (strcmp (buf, "OK") == 0)
> break;
> ! if (strlen (buf) == 3 && buf[0] == 'E'
> ! && isdigit (buf[1]) && isdigit (buf[2]))
> {
> error ("Protocol error with Rcmd");
> }
> for (p = buf; p[0] != '\0' && p[1] != '\0'; p += 2)
> {
> --- 4536,4545 ----
> if (strcmp (buf, "OK") == 0)
> break;
> !
> ! if (buf[0] == 'E')
> {
> error ("Protocol error with Rcmd");
> }
> +
> for (p = buf; p[0] != '\0' && p[1] != '\0'; p += 2)
> {
> ***************
A two hex-digit response with digit ``E'' is valid. That is why the code
had such a complicated check.
Andrew