2000-03-28 J.T. Conklin <jtc@redback.com>
[deliverable/binutils-gdb.git] / gdb / m32r-stub.c
index 56ae5ef551fab05d0066f88338c8585697f3bfea..9fdf4969e5a4eb7bbda499084fca308c977e01d9 100644 (file)
@@ -179,7 +179,7 @@ extern void breakpoint(void);
 
 static int  computeSignal(int);
 static void putpacket(unsigned char *);
-static unsigned char *getpacket(unsigned char *);
+static unsigned char *getpacket(void);
 
 static unsigned char *mem2hex(unsigned char *, unsigned char *, int, int);
 static unsigned char *hex2mem(unsigned char *, unsigned char *, int, int);
@@ -310,7 +310,7 @@ handle_exception(int exceptionVector)
 
   while (1==1) {
     remcomOutBuffer[0] = 0;
-    ptr = getpacket(remcomInBuffer);
+    ptr = getpacket();
     binary = 0;
     switch (*ptr++) {
       default: /* Unknown code.  Return an empty reply message. */
@@ -425,11 +425,11 @@ handle_exception(int exceptionVector)
                strcpy (remcomOutBuffer, "OK");
                break;
              }
-         strcpy (remcomOutBuffer, "P01");
+         strcpy (remcomOutBuffer, "E01");
          break;
        }
       case 'G': /* set the value of the CPU registers - return OK */
-       hex2mem(&ptr, (unsigned char*) registers, NUMREGBYTES, 0);
+       hex2mem(ptr, (unsigned char*) registers, NUMREGBYTES, 0);
        strcpy(remcomOutBuffer,"OK");
        break;
       case 's': /* sAA..AA     Step one instruction from AA..AA(optional) */
@@ -575,9 +575,9 @@ hex(ch)
 /* 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;
This page took 0.025072 seconds and 4 git commands to generate.