* i386-stub.c (handle_exception): Use 'T' response packet.

This commit is contained in:
J.T. Conklin 2001-03-01 22:45:42 +00:00
parent dc96c6c7af
commit e2a4c6c1d8
2 changed files with 27 additions and 4 deletions

View File

@ -1,3 +1,7 @@
2001-03-01 J.T. Conklin <jtc@redback.com>
* i386-stub.c (handle_exception): Use 'T' response packet.
2001-03-01 Michael Snyder <msnyder@mvstp600e.cygnus.com>
* m32r-tdep.c: Fix cut and paste error in comment.

View File

@ -758,10 +758,29 @@ handle_exception (int exceptionVector)
/* 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;
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 *)&registers[ESP], ptr, 4, 0); /* SP */
*ptr++ = ';';
*ptr++ = hexchars[EBP];
*ptr++ = ':';
ptr = mem2hex((char *)&registers[EBP], ptr, 4, 0); /* FP */
*ptr++ = ';';
*ptr++ = hexchars[PC];
*ptr++ = ':';
ptr = mem2hex((char *)&registers[PC], ptr, 4, 0); /* PC */
*ptr++ = ';';
*ptr = '\0'
putpacket (remcomOutBuffer);