* amd64obsd-tdep.c (amd64obsd_trapframe_sniffer): Spelling fix.
[deliverable/binutils-gdb.git] / gdb / sh-stub.c
index dc7ec330e3c96ecb835759df4d38dad9fb0d1399..bdd9e501b861b4ffc2c2dbe7176bf8ced4e614c9 100644 (file)
@@ -1,4 +1,4 @@
-/* sh-stub.c -- debugging stub for the Hitachi-SH.
+/* sh-stub.c -- debugging stub for the Renesas-SH.
 
  NOTE!! This code has to be compiled with optimization, otherwise the 
  function inlining which generates the exception handlers won't work.
 #include <string.h>
 #include <setjmp.h>
 
-/* Hitachi SH architecture instruction encoding masks */
+/* Renesas SH architecture instruction encoding masks */
 
 #define COND_BR_MASK   0xff00
 #define UCOND_DBR_MASK 0xe000
 #define UCOND_DISP     0x0fff
 #define UCOND_REG      0x0f00
 
-/* Hitachi SH instruction opcodes */
+/* Renesas SH instruction opcodes */
 
 #define BF_INSTR       0x8b00
 #define BT_INSTR       0x8900
 #define TRAPA_INSTR    0xc300
 #define SSTEP_INSTR    0xc3ff
 
-/* Hitachi SH processor register masks */
+/* Renesas SH processor register masks */
 
 #define T_BIT_MASK     0x0001
 
@@ -199,7 +199,7 @@ static int hex (char);
 static char *mem2hex (char *, char *, int);
 static char *hex2mem (char *, char *, int);
 static int hexToInt (char **, int *);
-static unsigned char *getpacket (unsigned char *);
+static unsigned char *getpacket (void);
 static void putpacket (char *);
 static void handle_buserror (void);
 static int computeSignal (int exceptionVector);
@@ -277,8 +277,8 @@ int registers[NUMREGBYTES / 4];
 stepData instrBuffer;
 char stepped;
 static const char hexchars[] = "0123456789abcdef";
-char remcomInBuffer[BUFMAX];
-char remcomOutBuffer[BUFMAX];
+static char remcomInBuffer[BUFMAX];
+static char remcomOutBuffer[BUFMAX];
 
 char highhex(int  x)
 {
@@ -383,9 +383,9 @@ hexToInt (char **ptr, int *intValue)
 /* scan for the sequence $<data>#<checksum>     */
 
 char *
-getpacket (buffer)
-     char *buffer;
+getpacket (void)
 {
+  unsigned char *buffer = &remcomInBuffer[0];
   unsigned char checksum;
   unsigned char xmitcsum;
   int count;
@@ -450,10 +450,10 @@ retry:
 /* send the packet in buffer. */
 
 static void
-putpacket (register char *buffer)
+putpacket (char *buffer)
 {
-  register  int checksum;
-  register  int count;
+  int checksum;
+  int count;
 
   /*  $<packet info>#<checksum>. */
   do
@@ -689,7 +689,7 @@ gdb_handle_exception (int exceptionVector)
   while (1)
     {
       remcomOutBuffer[0] = 0;
-      ptr = getpacket (remcomInBuffer);
+      ptr = getpacket ();
 
       switch (*ptr++)
        {
@@ -706,7 +706,7 @@ gdb_handle_exception (int exceptionVector)
          mem2hex ((char *) registers, remcomOutBuffer, NUMREGBYTES);
          break;
        case 'G':               /* set the value of the CPU registers - return OK */
-         hex2mem (&ptr, (char *) registers, NUMREGBYTES);
+         hex2mem (ptr, (char *) registers, NUMREGBYTES);
          strcpy (remcomOutBuffer, "OK");
          break;
 
@@ -802,7 +802,7 @@ void handle_exception(int exceptionVector)
 }
 
 void
-gdb_mode()
+gdb_mode (void)
 {
   ingdbmode = GDBCOOKIE;
   breakpoint();
@@ -824,7 +824,7 @@ breakpoint (void)
 
 /* Note:
 
-   The Hitachi SH family uses two exception architectures:
+   The Renesas SH family uses two exception architectures:
 
    SH1 & SH2:
 
@@ -1324,7 +1324,7 @@ static __inline__ void code_for_catch_exception(int n)
 
 
 static  void
-exceptions()
+exceptions (void)
 {
   code_for_catch_exception (CPU_BUS_ERROR_VEC);
   code_for_catch_exception (DMA_BUS_ERROR_VEC);
@@ -1492,12 +1492,12 @@ exceptions()
 void handleError (char theSSR);
 
 void
-nop ()
+nop (void)
 {
 
 }
 void 
-init_serial()
+init_serial (void)
 {
   int i;
 
@@ -1556,7 +1556,7 @@ getDebugChar (void)
 }
 
 int 
-putDebugCharReady()
+putDebugCharReady (void)
 {
   return (SSR1 & SCI_TDRE);
 }
This page took 0.026119 seconds and 4 git commands to generate.