From: jtc@redbacknetworks.com (J.T. Conklin)
To: gdb-patches@cygnus.com
Subject: m68k-stub.c patch, putpacket should wait for ACK.
Date: Thu, 01 Apr 1999 00:00:00 -0000 [thread overview]
Message-ID: <5md82njpam.fsf@jtc.redbacknetworks.com> (raw)
Message-ID: <19990401000000.3ClAWqHrED63SL3bxsOwkTJBDfdnts5kLTzeYiD9Fn8@z> (raw)
The enclosed patch fixes a problem with m68k-stub.c, putpacket() only
gave GDB one chance to receive the packet --- it did not wait until a
ACK/NACK packet was received. Granted, the target will "hang" if the
ACK or NACK is lost, but that's a deficiency in the protocol shared by
all targets. IMO, it's better that the putpacket() implementation of
all the sample stubs be the same. This change brings them closer
together (the sh stub is the only one that currently implements run
length compression).
1999-03-05 J.T. Conklin <jtc@redbacknetworks.com>
* m68k-stub.c (putpacket): Restore code so that packets are sent
until an ACK is received.
Index: m68k-stub.c
===================================================================
RCS file: /usr/rback/release/tools-src/gdb/gdb/m68k-stub.c,v
retrieving revision 1.2
diff -c -r1.2 m68k-stub.c
*** m68k-stub.c 1998/12/03 19:55:51 1.2
--- m68k-stub.c 1999/03/06 02:50:29
***************
*** 588,610 ****
char ch;
/* $<packet info>#<checksum>. */
! do {
! putDebugChar('$');
! checksum = 0;
! count = 0;
!
! while (ch=buffer[count]) {
! putDebugChar(ch);
! checksum += ch;
! count += 1;
! }
!
! putDebugChar('#');
! putDebugChar(hexchars[checksum >> 4]);
! putDebugChar(hexchars[checksum % 16]);
! } while (1 == 0); /* (getDebugChar() != '+'); */
!
}
char remcomInBuffer[BUFMAX];
--- 588,612 ----
char ch;
/* $<packet info>#<checksum>. */
! do
! {
! putDebugChar('$');
! checksum = 0;
! count = 0;
!
! while (ch=buffer[count])
! {
! putDebugChar(ch);
! checksum += ch;
! count += 1;
! }
!
! putDebugChar('#');
! putDebugChar(hexchars[checksum >> 4]);
! putDebugChar(hexchars[checksum % 16]);
! }
! while ((getDebugChar() & 0x7f) != '+');
}
char remcomInBuffer[BUFMAX];
--
J.T. Conklin
RedBack Networks
next reply other threads:[~1999-04-01 0:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-03-05 19:00 J.T. Conklin [this message]
1999-04-01 0:00 ` J.T. Conklin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5md82njpam.fsf@jtc.redbacknetworks.com \
--to=jtc@redbacknetworks.com \
--cc=gdb-patches@cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox