This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH]: Change i386-stub.c to use 'T' response packet.
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: [PATCH]: Change i386-stub.c to use 'T' response packet.
- From: jtc at redback dot com (J.T. Conklin)
- Date: 01 Mar 2001 14:43:24 -0800
- Reply-To: jtc at redback dot com
I'll be committing the following patch. It changes i386-stub.c to use
the 'T' instead of the 'S' response packet to notify GDB the target is
stopped. This greatly improves step performance, since in most cases
GDB no longer has to fetch all registers.
2001-03-01 J.T. Conklin <jtc@redback.com>
* i386-stub.c (handle_exception): Use 'T' response packet.
Index: i386-stub.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-stub.c,v
retrieving revision 1.3
diff -c -r1.3 i386-stub.c
*** i386-stub.c 2001/01/23 19:45:08 1.3
--- i386-stub.c 2001/03/01 22:35:47
***************
*** 758,767 ****
/* reply to host that an exception has occurred */
sigval = computeSignal (exceptionVector);
! remcomOutBuffer[0] = 'S';
! remcomOutBuffer[1] = hexchars[sigval >> 4];
! remcomOutBuffer[2] = hexchars[sigval % 16];
! remcomOutBuffer[3] = 0;
putpacket (remcomOutBuffer);
--- 758,786 ----
/* reply to host that an exception has occurred */
sigval = computeSignal (exceptionVector);
!
! ptr = remcomOutBuffer;
!
! *ptr++ = 'T'; /* notify gdb with signo, PC, FP and SP */
! *ptr++ = hexchars[sigval >> 4];
! *ptr++ = hexchars[sigval & 0xf];
!
! *ptr++ = hexchars[ESP];
! *ptr++ = ':';
! ptr = mem2hex((char *)®isters[ESP], ptr, 4, 0); /* SP */
! *ptr++ = ';';
!
! *ptr++ = hexchars[EBP];
! *ptr++ = ':';
! ptr = mem2hex((char *)®isters[EBP], ptr, 4, 0); /* FP */
! *ptr++ = ';';
!
! *ptr++ = hexchars[PC];
! *ptr++ = ':';
! ptr = mem2hex((char *)®isters[PC], ptr, 4, 0); /* PC */
! *ptr++ = ';';
!
! *ptr = '\0'
putpacket (remcomOutBuffer);
--
J.T. Conklin
RedBack Networks