This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: Standard GDB Remote Protocol
>>>>> "Bill" == Bill Gatliff <gatliff@haulpak.com> writes:
>> This way if you don't implement any of those messages, you don't need to
>> implement Escaping. But it advantageous in that it defines how escaping
>> will be used in any/all messages that require it. I think the same
>> should be said for RLE.
Bill> Agreed. Maybe RLE and escaping go at the level that $#+- are at,
Bill> instead of on a per-message basis, so the protocol will allow you
Bill> to RLE or escape *any* message. I think that's what you're saying,
Bill> anyway...
Had binary data been quoted at the data link layer, the implementation
would have been a lot simpler and likely more robust. I wish I would
have noticed this back when I objected to binary write being added as
4.18 was being released.
Unfortunately, I can't see how we can do this in a compatible manner.
The character stuffing increases the packet length. The memory write
command compensates by reducing the length of the data being written,
resulting in a packet < PBUFSIZ.
Ideally you don't want the protocol layer to know these kind of
details --- only the link layer MTU. This would work fine if both GDB
and the stub did quoting at the link layer. Gdb could send a packet
that, after stuffing, was larger than PBUFSIZ. But this would not be
a problem because the new stub would un-stuff (and un-rle) packets as
they are received. But if such a GDB was communicating to a stub that
didn't unstuff until the 'X' command was processed, packet buffers may
overflow.
>> Maybe each message needs a check list that
>> states what features it may use like this:
>>
>> My new Message U My comments on this message
Bill> Or maybe a new kind of query? I'm not sure I like that
Bill> approach, but queries may have been created with stuff like this
Bill> in mind. With only slightly more than a year of gdb under my
Bill> belt, however, I don't have enough experience to say. Perhaps
Bill> someone else does?
Perhaps we could have a query command used determine data link layer
capabilities. It would have to be issued at the initial connection,
and would have to be issued with the least-common-denominator 7 bit
query, no-rle, framing. It's a bit ugly... I don't like it... but
it probably could be made to work.
--jtc
--
J.T. Conklin
RedBack Networks