This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: remote.c run-length encoding patch
- To: Andrew Cagney <ac131313@cygnus.com>
- Subject: Re: remote.c run-length encoding patch
- From: Michael Snyder <msnyder@cygnus.com>
- Date: Tue, 31 Aug 1999 13:43:40 -0700
- CC: jtc@redback.com, gdb-patches@sourceware.cygnus.com
- Organization: Cygnus Solutions
- References: <5mr9kyhvln.fsf@jtc.redbacknetworks.com> <37BE0366.A512A504@cygnus.com>
Please excuse the delay in replying.
JT, thank you for the patch.
Andrew, yes it works on the target board.
OK to check in.
Michael
Andrew Cagney wrote:
>
> "J.T. Conklin" wrote:
> >
> > The Cisco remote protocol varient (notice that I didn't say mutant
> > remote protocol this time :-) uses two hex characters instead of a
> > ASCII encoding for the run length but is otherwise the same as the
> > standard protocol.
> >
> > However, the code implementing the decoding is quite different for the
> > two encodings. The standard encoding is expanded as the packet is
> > read, while the Cisco varient reads the entire packet and then expands
> > it in place (actually it expands it to another buffer, and the copies
> > that buffer into the first). Unlike the code implementing the
> > standard encoding, the Cisco varient does not detect a packet that
> > would expand to larger than the buffer size, which could lead to
> > corruption within GDB.
>
> I've an alternate patch to this laying around here :-)
>
> > In this patch, I decided to handle both encodings in the same manner.
> >
> > --jtc
>
> Thanks. Michael, can you confirm that the change works on a cisco
> target?
>
> Andrew