Replace calls to abort() with calls to internal_error().
[deliverable/binutils-gdb.git] / gdb / remote-e7000.c
index 6022c4d065e379f07824f896ccb4c0696565221a..904ce1f4e54c19428c3fe195ee7c629ecf1669e3 100644 (file)
@@ -1,5 +1,5 @@
 /* Remote debugging interface for Hitachi E7000 ICE, for GDB
-   Copyright 1993, 1994, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+   Copyright 1993, 1994, 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
    Contributed by Cygnus Support. 
 
    Written by Steve Chamberlain for Cygnus Support.
 #include "gdbarch.h"
 #include "inferior.h"
 #include "target.h"
-#include "gdb_wait.h"
 #include "value.h"
 #include "command.h"
-#include <signal.h>
 #include "gdb_string.h"
 #include "gdbcmd.h"
 #include <sys/types.h>
@@ -562,14 +560,14 @@ or \t\ttarget e7000 pc\n");
 /* Stub for catch_errors.  */
 
 static int
-e7000_start_remote (char *dummy)
+e7000_start_remote (void *dummy)
 {
   int loop;
   int sync;
   int try;
   int quit_trying;
 
-  immediate_quit = 1;          /* Allow user to interrupt it */
+  immediate_quit++;            /* Allow user to interrupt it */
 
   /* Hello?  Are you there?  */
   sync = 0;
@@ -627,7 +625,7 @@ e7000_start_remote (char *dummy)
   if (!sync)
     {
       fprintf_unfiltered (gdb_stderr, "Giving up after %d tries...\n", try);
-      error ("Unable to syncronize with target.\n");
+      error ("Unable to synchronize with target.\n");
     }
 
   puts_e7000debug ("\r");
@@ -635,7 +633,7 @@ e7000_start_remote (char *dummy)
   puts_e7000debug ("b -\r");   /* Clear breakpoints */
   expect_prompt ();
 
-  immediate_quit = 0;
+  immediate_quit--;
 
 /* This is really the job of start_remote however, that makes an assumption
    that the target is about to print out a status message of some sort.  That
@@ -700,7 +698,7 @@ e7000_close (int quitting)
    when you want to detach and do something else with your gdb.  */
 
 static void
-e7000_detach (int from_tty)
+e7000_detach (char *arg, int from_tty)
 {
   pop_target ();               /* calls e7000_close to do the real work */
   if (from_tty)
@@ -710,7 +708,7 @@ e7000_detach (int from_tty)
 /* Tell the remote machine to resume.  */
 
 static void
-e7000_resume (int pid, int step, int sig)
+e7000_resume (int pid, int step, enum target_signal sigal)
 {
   if (step)
     puts_e7000debug ("S\r");
@@ -795,9 +793,7 @@ gbyte (void)
 }
 
 void
-fetch_regs_from_dump (nextchar, want)
-     int (*nextchar) ();
-     char *want;
+fetch_regs_from_dump (int (*nextchar) (), char *want)
 {
   int regno;
   char buf[MAX_REGISTER_RAW_SIZE];
@@ -891,11 +887,11 @@ fetch_regs_from_dump (nextchar, want)
                }
 
              else
-               abort ();
+               internal_error (__FILE__, __LINE__, "failed internal consistency check");
            }
          store_signed_integer (buf,
                                REGISTER_RAW_SIZE (regno),
-                               (LONGEST) get_hex (&thischar, nextchar));
+                               (LONGEST) get_hex (&thischar));
          supply_register (regno, buf);
          break;
        }
@@ -1064,7 +1060,7 @@ e7000_prepare_to_store (void)
 }
 
 static void
-e7000_files_info (void)
+e7000_files_info (struct target_ops *ops)
 {
   printf_unfiltered ("\tAttached to %s at %d baud.\n", dev_name, baudrate);
 }
@@ -1468,13 +1464,17 @@ fast_but_for_the_pause_e7000_read_inferior_memory (CORE_ADDR memaddr,
 
 #endif
 
+/* Transfer LEN bytes between GDB address MYADDR and target address
+   MEMADDR.  If WRITE is non-zero, transfer them to the target,
+   otherwise transfer them from the target.  TARGET is unused.
+
+   Returns the number of bytes transferred. */
+
 static int
-e7000_xfer_inferior_memory (memaddr, myaddr, len, write, target)
-     CORE_ADDR memaddr;
-     unsigned char *myaddr;
-     int len;
-     int write;
-     struct target_ops *target;        /* ignored */
+e7000_xfer_inferior_memory (CORE_ADDR memaddr, char *myaddr,
+                           int len, int write, 
+                           struct mem_attrib *attrib ATTRIBUTE_UNUSED,
+                           struct target_ops *target ATTRIBUTE_UNUSED)
 {
   if (write)
     return e7000_write_inferior_memory (memaddr, myaddr, len);
@@ -1485,7 +1485,7 @@ e7000_xfer_inferior_memory (memaddr, myaddr, len, write, target)
 }
 
 static void
-e7000_kill (char *args, int from_tty)
+e7000_kill (void)
 {
 }
 
@@ -1696,7 +1696,7 @@ static CORE_ADDR breakaddr[MAX_BREAKPOINTS] =
 {0};
 
 static int
-e7000_insert_breakpoint (CORE_ADDR addr, unsigned char *shadow)
+e7000_insert_breakpoint (CORE_ADDR addr, char *shadow)
 {
   int i;
   char buf[200];
@@ -1739,7 +1739,7 @@ e7000_insert_breakpoint (CORE_ADDR addr, unsigned char *shadow)
 }
 
 static int
-e7000_remove_breakpoint (CORE_ADDR addr, unsigned char *shadow)
+e7000_remove_breakpoint (CORE_ADDR addr, char *shadow)
 {
   int i;
   char buf[200];
@@ -2117,7 +2117,7 @@ e7000_wait (int pid, struct target_waitstatus *status)
       break;
     default:
       /* Get the user's attention - this should never happen. */
-      abort ();
+      internal_error (__FILE__, __LINE__, "failed internal consistency check");
     }
 
   return 0;
This page took 0.043665 seconds and 4 git commands to generate.