aboutsummaryrefslogtreecommitdiff
path: root/gdb/m68k-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/m68k-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/m68k-stub.c')
-rw-r--r--gdb/m68k-stub.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/gdb/m68k-stub.c b/gdb/m68k-stub.c
index 97adaba..3915fda 100644
--- a/gdb/m68k-stub.c
+++ b/gdb/m68k-stub.c
@@ -522,10 +522,15 @@ char ch;
return (-1);
}
+static char remcomInBuffer[BUFMAX];
+static char remcomOutBuffer[BUFMAX];
+/* scan for the sequence $<data>#<checksum> */
+
unsigned char *
-getpacket (unsigned char *buffer)
+getpacket ()
{
+ unsigned char *buffer = &remcomInBuffer[0];
unsigned char checksum;
unsigned char xmitcsum;
int count;
@@ -622,11 +627,6 @@ char * buffer;
}
-char remcomInBuffer[BUFMAX];
-char remcomOutBuffer[BUFMAX];
-static short error;
-
-
void debug_error(format, parm)
char * format;
char * parm;
@@ -777,9 +777,8 @@ void handle_exception(int exceptionVector)
stepping = 0;
while (1==1) {
- error = 0;
remcomOutBuffer[0] = 0;
- ptr = getpacket(remcomInBuffer);
+ ptr = getpacket();
switch (*ptr++) {
case '?' : remcomOutBuffer[0] = 'S';
remcomOutBuffer[1] = hexchars[sigval >> 4];