This is the mail archive of the gdb-patches@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 run-length encoding patch


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

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