This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: remote.c patch


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]