aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJ.T. Conklin <jtc@acorntoolworks.com>2001-03-01 22:45:42 +0000
committerJ.T. Conklin <jtc@acorntoolworks.com>2001-03-01 22:45:42 +0000
commite2a4c6c1d8490f8b9968ed7a48bea758842f3edb (patch)
tree06345a421439272ff8cd201ec9ad46253f6112cc /gdb
parentdc96c6c7afa1c294ab24670bb186f79547c3398f (diff)
downloadfsf-binutils-gdb-e2a4c6c1d8490f8b9968ed7a48bea758842f3edb.zip
fsf-binutils-gdb-e2a4c6c1d8490f8b9968ed7a48bea758842f3edb.tar.gz
fsf-binutils-gdb-e2a4c6c1d8490f8b9968ed7a48bea758842f3edb.tar.bz2
* i386-stub.c (handle_exception): Use 'T' response packet.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/i386-stub.c27
2 files changed, 27 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3be660e..1a33dba 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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.
diff --git a/gdb/i386-stub.c b/gdb/i386-stub.c
index 7aa5da9..1251567 100644
--- a/gdb/i386-stub.c
+++ b/gdb/i386-stub.c
@@ -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);