* m68k-stub.c patch, putpacket should wait for ACK.
@ 1999-03-05 19:00 J.T. Conklin
1999-04-01 0:00 ` J.T. Conklin
0 siblings, 1 reply; 2+ messages in thread
From: J.T. Conklin @ 1999-03-05 19:00 UTC (permalink / raw)
To: gdb-patches
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* m68k-stub.c patch, putpacket should wait for ACK.
1999-03-05 19:00 m68k-stub.c patch, putpacket should wait for ACK J.T. Conklin
@ 1999-04-01 0:00 ` J.T. Conklin
0 siblings, 0 replies; 2+ messages in thread
From: J.T. Conklin @ 1999-04-01 0:00 UTC (permalink / raw)
To: gdb-patches
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1999-04-01 0:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-03-05 19:00 m68k-stub.c patch, putpacket should wait for ACK J.T. Conklin
1999-04-01 0:00 ` J.T. Conklin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox