aboutsummaryrefslogtreecommitdiff
path: root/gdb/sparc-stub.c
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>1999-09-09 00:02:17 +0000
committerStan Shebs <shebs@codesourcery.com>1999-09-09 00:02:17 +0000
commitd4f3574e777abfa65c9ba134e582228f3f32a8d6 (patch)
tree408b74c26833555087f04f4ec466afd488af6087 /gdb/sparc-stub.c
parent325188ecac3a52d92d359c70f9b730470760e1d7 (diff)
downloadgdb-d4f3574e777abfa65c9ba134e582228f3f32a8d6.zip
gdb-d4f3574e777abfa65c9ba134e582228f3f32a8d6.tar.gz
gdb-d4f3574e777abfa65c9ba134e582228f3f32a8d6.tar.bz2
import gdb-1999-09-08 snapshot
Diffstat (limited to 'gdb/sparc-stub.c')
-rw-r--r--gdb/sparc-stub.c52
1 files changed, 6 insertions, 46 deletions
diff --git a/gdb/sparc-stub.c b/gdb/sparc-stub.c
index 8e88e56..ce2aadd 100644
--- a/gdb/sparc-stub.c
+++ b/gdb/sparc-stub.c
@@ -62,9 +62,6 @@
*
* ? What was the last sigval ? SNN (signal NN)
*
- * bBB..BB Set baud rate to BB..BB OK or BNN, then sets
- * baud rate
- *
* All commands and responses are sent with a packet which includes a
* checksum. A packet consists of
*
@@ -284,12 +281,15 @@ hex(ch)
return -1;
}
+static char remcomInBuffer[BUFMAX];
+static char remcomOutBuffer[BUFMAX];
+
/* scan for the sequence $<data>#<checksum> */
unsigned char *
-getpacket (buffer)
- unsigned char *buffer;
+getpacket ()
{
+ unsigned char *buffer = &remcomInBuffer[0];
unsigned char checksum;
unsigned char xmitcsum;
int count;
@@ -382,9 +382,6 @@ putpacket(buffer)
while (getDebugChar() != '+');
}
-static char remcomInBuffer[BUFMAX];
-static char remcomOutBuffer[BUFMAX];
-
/* Indicate to caller of mem2hex or hex2mem that there has been an
error. */
static volatile int mem_err = 0;
@@ -653,7 +650,7 @@ handle_exception (registers)
{
remcomOutBuffer[0] = 0;
- ptr = getpacket(remcomInBuffer);
+ ptr = getpacket();
switch (*ptr++)
{
case '?':
@@ -769,43 +766,6 @@ handle_exception (registers)
asm ("call 0
nop ");
break;
-
-#if 0
-Disabled until we can unscrew this properly
-
- case 'b': /* bBB... Set baud rate to BB... */
- {
- int baudrate;
- extern void set_timer_3();
-
- if (!hexToInt(&ptr, &baudrate))
- {
- strcpy(remcomOutBuffer,"B01");
- break;
- }
-
- /* Convert baud rate to uart clock divider */
- switch (baudrate)
- {
- case 38400:
- baudrate = 16;
- break;
- case 19200:
- baudrate = 33;
- break;
- case 9600:
- baudrate = 65;
- break;
- default:
- strcpy(remcomOutBuffer,"B02");
- goto x1;
- }
-
- putpacket("OK"); /* Ack before changing speed */
- set_timer_3(baudrate); /* Set it */
- }
-x1: break;
-#endif
} /* switch */
/* reply to the request */