This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: breakpoint extension for remote protocol, take II
"J.T. Conklin" wrote:
> However, there is still one problem with my proposal which I have not
> had time to address. As the remote protocol is a datagram protocol
> and the breakpoint extension adds run-time state to the stub, there
> must be some mechanism to handle dropped and duplicate packets.
> Perhaps a sequence number argument needs to be added to the command
> and the response.
>
> Zseq,t,AA..AA,LLLL
> OK<seq>
> ERR<seq>
>
> The same sequence number scheme could be used for this, and any other
> stateful commands that might be added in the future.
(correct, dropped, duplicate, re-ordered)
FYI,
Another undocumented feature of a typical stub is that it can have a
sequence number:
``$'' <seq> <seq> ``:'' <packet>
ex: <- $23:Z,0,1234,2
-> +23
Look for the code:
void getpacket(buffer)
.....
if (checksum != xmitcsum) putDebugChar('-'); /* failed checksum
*/
else {
putDebugChar('+'); /* successful transfer */
/* if a sequence char is present, reply the sequence ID */
if (buffer[2] == ':') {
Mind you I don't know that it helps. The stub doesn't do anything with
the sequence number apart from send it straight back. It doesn't, for
instance discard a duplicate.
Andrew
PS: Perhaphs I should cut/paste the layering comment you made (from
QBaud) here :-)