summaryrefslogtreecommitdiff
path: root/gdb/m68k-stub.c
diff options
context:
space:
mode:
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 97adaba9423..3915fda7ce1 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];