* config/sparc/nm-linux.h: Include config/nm-linux.h.
[deliverable/binutils-gdb.git] / gdb / remote-mips.c
index 6d6329d6dca554b2e29fdcb28a7b8f4cbbf87a16..efafd6d110332ab2917d0b6fd21c8cc85d24efee 100644 (file)
@@ -1,5 +1,5 @@
 /* Remote debugging interface for MIPS remote debugging protocol.
-   Copyright 1993, 1994, 1995 Free Software Foundation, Inc.
+   Copyright 1993-1995, 2000 Free Software Foundation, Inc.
    Contributed by Cygnus Support.  Written by Ian Lance Taylor
    <ian@cygnus.com>.
 
@@ -24,7 +24,7 @@
 #include "inferior.h"
 #include "bfd.h"
 #include "symfile.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include "gdbcmd.h"
 #include "gdbcore.h"
 #include "serial.h"
 #include <signal.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#ifdef ANSI_PROTOTYPES
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
 
 /* Microsoft C's stat.h doesn't define all the POSIX file modes.  */
 #ifndef S_IROTH
 #define S_IROTH S_IREAD
 #endif
 
-extern void mips_set_processor_type_command PARAMS ((char *, int));
 \f
 
 /* Breakpoint types.  Values 0, 1, and 2 must agree with the watch
@@ -399,7 +393,7 @@ static int interrupt_count;
 static int mips_wait_flag = 0;
 
 /* If non-zero, monitor supports breakpoint commands. */
-static monitor_supports_breakpoints = 0;
+static int monitor_supports_breakpoints = 0;
 
 /* Data cache header.  */
 
@@ -487,22 +481,11 @@ close_ports ()
    inconsistent state.  */
 
 static NORETURN void
-#ifdef ANSI_PROTOTYPES
 mips_error (char *string,...)
-#else
-mips_error (va_alist)
-     va_dcl
-#endif
 {
   va_list args;
 
-#ifdef ANSI_PROTOTYPES
   va_start (args, string);
-#else
-  char *string;
-  va_start (args);
-  string = va_arg (args, char *);
-#endif
 
   target_terminal_ours ();
   wrap_here ("");              /* Force out any buffered output */
@@ -531,7 +514,7 @@ mips_error (va_alist)
 static void
 fputc_readable (ch, file)
      int ch;
-     struct gdb_file *file;
+     struct ui_file *file;
 {
   if (ch == '\n')
     fputc_unfiltered ('\n', file);
@@ -552,7 +535,7 @@ fputc_readable (ch, file)
 static void
 fputs_readable (string, file)
      char *string;
-     struct gdb_file *file;
+     struct ui_file *file;
 {
   int c;
 
@@ -1279,7 +1262,7 @@ mips_request (cmd, addr, data, perr, timeout, buff)
   if (cmd != '\0')
     {
       if (mips_need_reply)
-       fatal ("mips_request: Trying to send command before reply");
+       internal_error ("mips_request: Trying to send command before reply");
       sprintf (buff, "0x0 %c 0x%s 0x%s", cmd, paddr_nz (addr), paddr_nz (data));
       mips_send_packet (buff, 1);
       mips_need_reply = 1;
@@ -1289,7 +1272,7 @@ mips_request (cmd, addr, data, perr, timeout, buff)
     return 0;
 
   if (!mips_need_reply)
-    fatal ("mips_request: Trying to get reply before command");
+    internal_error ("mips_request: Trying to get reply before command");
 
   mips_need_reply = 0;
 
@@ -2561,7 +2544,7 @@ remote_mips_remove_watchpoint (addr, len, type)
 }
 
 int
-remote_mips_stopped_by_watchpoint ()
+remote_mips_stopped_by_watchpoint (void)
 {
   return hit_watchpoint;
 }
@@ -2880,7 +2863,7 @@ send_srec (srec, len, addr)
        case 0x6:               /* ACK */
          return;
        case 0x15:              /* NACK */
-         fprintf_unfiltered (gdb_stderr, "Download got a NACK at byte %d!  Retrying.\n", addr);
+         fprintf_unfiltered (gdb_stderr, "Download got a NACK at byte %s!  Retrying.\n", paddr_u (addr));
          continue;
        default:
          error ("Download got unexpected ack char: 0x%x, retrying.\n", ch);
@@ -2926,9 +2909,10 @@ mips_load_srec (args)
        {
          unsigned int numbytes;
 
-         /* FIXME!  vma too small?? */
-         printf_filtered ("%s\t: 0x%4x .. 0x%4x  ", s->name, s->vma,
-                          s->vma + s->_raw_size);
+         /* FIXME!  vma too small????? */
+         printf_filtered ("%s\t: 0x%4lx .. 0x%4lx  ", s->name,
+                          (long) s->vma,
+                          (long) (s->vma + s->_raw_size));
          gdb_flush (gdb_stdout);
 
          for (i = 0; i < s->_raw_size; i += numbytes)
This page took 0.026712 seconds and 4 git commands to generate.