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]

remote protocol run length encoding


I recently mentioned that I was going to see about taking support for
run length encoding found in sh-stub.c's putpacket() and adding it to
the other sample stubs.  After taking another look, I've decided that
it's probably not a good idea to do so.  In fact, the right thing to
do might be to remove it from the sh stub as well.

The problem is in the way the run length is encoded.  29 is added to
the run length, which yields a printable ASCII character for extents
between 3 and 97 characters.  Unfortunately, this includes '$', '#',
'+', and '-' which can exacerbate problems caused by transport layer
glitches.  It's been my experience that such glitches occur all too
often to ignore, so the protocol itself must be made as robust as
possible.

The run length encoding used by Cisco's remote protocol varient is
safe, as it uses two hex digits to represent the length.  Perhaps we
could add a variable which selected which RLE method to use?  At the
same time, we could add support for encoding of command packets.  It
could be quite useful for register and memory writes.

Thoughts?

        --jtc

-- 
J.T. Conklin
RedBack Networks

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