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: Standard GDB Remote Protocol


On Thu, Dec 02, 1999 at 08:43:51AM -0600, William Gatliff wrote:

> > Packet Structure:
> >
> > Simple structure, obviously originally designed to be able to be driven
> > manually from a TTY. (Hence it's ASCII nature.) However, the protocol has
> > evolved quite significantly and I doubt it could still be used very
> > efficiently from a TTY.
> 
> True, but it can still be *monitored* quite effectively with a TTY,

And this is a Very Good Thing.  Debugging the RDI target stuff was a
pain because of the binary packet format.  Even after adding of
packet-logging routines, it still wasn't obvious what was wrong.
Fortunately, I do that sort of stuff for a living and have an HP
protocol analyzer sitting handy.  :)

Most of the features in the RDI packet protocol either don't work or
aren't used, so a simpler ASCII protocol would have served just as
well.

An ASCII protocol also allows you to whip together a quick simulator
for either end using something like expect (and netcat if you want to
do TCP/IP).  This can save your ass big time when trying to isolate
problems.

> and simple things like a ? query are still possible.  If I'm using a
> TTY then I'm desperate anyway, so I'm willing to put up with a
> little pain.  Go to a non-ASCII protocol, however, and the TTY
> option is right out altogether, no matter how desperate I am!
> 
> If efficiency/throughput is a problem, then go to ethernet.  At
> 10/100Mbps, even the overhead of ASCII isn't a problem for most
> targets I can think of.

Definitely.  The RDI packet stuff is binary, but it's still only
pleasant to use via Ethernet.  For example, a "next" involves
exchanging about a half-dozen packets, and even when they're in
binary, doing it via RS-232 involves an annoyinge delay when you're
used to seeing the green arrow in DDD move instantly..

-- 
Grant Edwards
grante@visi.com

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