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: jtc@redback.com, Michael Snyder <msnyder@cygnus.com>
- Subject: Re: remote.c run-length encoding patch
- From: Andrew Cagney <ac131313@cygnus.com>
- Date: Sat, 21 Aug 1999 11:39:50 +1000
- CC: gdb-patches@sourceware.cygnus.com
- Organization: Cygnus Solutions
- References: <5mr9kyhvln.fsf@jtc.redbacknetworks.com>
"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