2005-01-14 Andrew Cagney <cagney@gnu.org>
[deliverable/binutils-gdb.git] / gdb / remote-mips.c
index ae54df9321df815438c65819b2ca4104a411b0e1..60f4546063b54870994cd18ddbf563d4426b4702 100644 (file)
@@ -31,6 +31,7 @@
 #include "gdbcore.h"
 #include "serial.h"
 #include "target.h"
+#include "exceptions.h"
 #include "remote-utils.h"
 #include "gdb_string.h"
 #include "gdb_stat.h"
@@ -496,7 +497,7 @@ mips_error (char *string,...)
   printf_unfiltered ("Ending remote MIPS debugging.\n");
   target_mourn_inferior ();
 
-  throw_exception (RETURN_ERROR);
+  throw_reason (RETURN_ERROR);
 }
 
 /* putc_readable - print a character, displaying non-printable chars in
@@ -1586,7 +1587,7 @@ device is attached to the target board (e.g., /dev/ttya).\n"
   flush_cached_frames ();
   registers_changed ();
   stop_pc = read_pc ();
-  print_stack_frame (get_selected_frame (), 0, SRC_AND_LOC);
+  print_stack_frame (get_selected_frame (NULL), 0, SRC_AND_LOC);
   xfree (serial_port_name);
 }
 
@@ -1757,16 +1758,16 @@ mips_wait (ptid_t ptid, struct target_waitstatus *status)
     {
       char buf[MAX_REGISTER_SIZE];
 
-      store_unsigned_integer (buf, DEPRECATED_REGISTER_RAW_SIZE (PC_REGNUM), rpc);
+      store_unsigned_integer (buf, register_size (current_gdbarch, PC_REGNUM), rpc);
       regcache_raw_supply (current_regcache, PC_REGNUM, buf);
 
-      store_unsigned_integer (buf, DEPRECATED_REGISTER_RAW_SIZE (PC_REGNUM), rfp);
+      store_unsigned_integer (buf, register_size (current_gdbarch, PC_REGNUM), rfp);
       regcache_raw_supply (current_regcache, 30, buf); /* This register they are avoiding and so it is unnamed */
 
-      store_unsigned_integer (buf, DEPRECATED_REGISTER_RAW_SIZE (SP_REGNUM), rsp);
+      store_unsigned_integer (buf, register_size (current_gdbarch, SP_REGNUM), rsp);
       regcache_raw_supply (current_regcache, SP_REGNUM, buf);
 
-      store_unsigned_integer (buf, DEPRECATED_REGISTER_RAW_SIZE (DEPRECATED_FP_REGNUM), 0);
+      store_unsigned_integer (buf, register_size (current_gdbarch, DEPRECATED_FP_REGNUM), 0);
       regcache_raw_supply (current_regcache, DEPRECATED_FP_REGNUM, buf);
 
       if (nfields == 9)
@@ -1860,8 +1861,7 @@ mips_wait (ptid_t ptid, struct target_waitstatus *status)
 }
 
 /* We have to map between the register numbers used by gdb and the
-   register numbers used by the debugging protocol.  This function
-   assumes that we are using tm-mips.h.  */
+   register numbers used by the debugging protocol.  */
 
 #define REGNO_OFFSET 96
 
@@ -1905,7 +1905,7 @@ mips_fetch_registers (int regno)
       return;
     }
 
-  if (regno == DEPRECATED_FP_REGNUM || regno == ZERO_REGNUM)
+  if (regno == DEPRECATED_FP_REGNUM || regno == MIPS_ZERO_REGNUM)
     /* DEPRECATED_FP_REGNUM on the mips is a hack which is just
        supposed to read zero (see also mips-nat.c).  */
     val = 0;
@@ -1938,7 +1938,7 @@ mips_fetch_registers (int regno)
 
     /* We got the number the register holds, but gdb expects to see a
        value in the target byte ordering.  */
-    store_unsigned_integer (buf, DEPRECATED_REGISTER_RAW_SIZE (regno), val);
+    store_unsigned_integer (buf, register_size (current_gdbarch, regno), val);
     regcache_raw_supply (current_regcache, regno, buf);
   }
 }
@@ -2148,7 +2148,7 @@ Give up (and stop debugging it)? "))
          printf_unfiltered ("Ending remote MIPS debugging.\n");
          target_mourn_inferior ();
 
-         throw_exception (RETURN_QUIT);
+         throw_reason (RETURN_QUIT);
        }
 
       target_terminal_inferior ();
@@ -2225,7 +2225,7 @@ static int
 mips_insert_breakpoint (CORE_ADDR addr, char *contents_cache)
 {
   if (monitor_supports_breakpoints)
-    return set_breakpoint (addr, MIPS_INSTLEN, BREAK_FETCH);
+    return set_breakpoint (addr, MIPS_INSN32_SIZE, BREAK_FETCH);
   else
     return memory_insert_breakpoint (addr, contents_cache);
 }
@@ -2234,7 +2234,7 @@ static int
 mips_remove_breakpoint (CORE_ADDR addr, char *contents_cache)
 {
   if (monitor_supports_breakpoints)
-    return clear_breakpoint (addr, MIPS_INSTLEN, BREAK_FETCH);
+    return clear_breakpoint (addr, MIPS_INSN32_SIZE, BREAK_FETCH);
   else
     return memory_remove_breakpoint (addr, contents_cache);
 }
@@ -2657,7 +2657,8 @@ mips_load_srec (char *args)
 
              bfd_get_section_contents (abfd, s, buffer, i, numbytes);
 
-             reclen = mips_make_srec (srec, '3', s->vma + i, buffer, numbytes);
+             reclen = mips_make_srec (srec, '3', s->vma + i, 
+                                      buffer, numbytes);
              send_srec (srec, reclen, s->vma + i);
 
              if (deprecated_ui_load_progress_hook)
@@ -3174,7 +3175,8 @@ pmon_load_fast (char *file)
                   the line: */
                for (; ((binamount - binptr) > 0);)
                  {
-                   pmon_make_fastrec (&bp, binbuf, &binptr, binamount, &reclen, &csum, &zerofill);
+                   pmon_make_fastrec (&bp, binbuf, &binptr, binamount, 
+                                      &reclen, &csum, &zerofill);
                    if (reclen >= (MAXRECSIZE - CHECKSIZE))
                      {
                        reclen = pmon_checkset (reclen, &bp, &csum);
@@ -3306,7 +3308,7 @@ _initialize_remote_mips (void)
   mips_ops.to_fetch_registers = mips_fetch_registers;
   mips_ops.to_store_registers = mips_store_registers;
   mips_ops.to_prepare_to_store = mips_prepare_to_store;
-  mips_ops.to_xfer_memory = mips_xfer_memory;
+  mips_ops.deprecated_xfer_memory = mips_xfer_memory;
   mips_ops.to_files_info = mips_files_info;
   mips_ops.to_insert_breakpoint = mips_insert_breakpoint;
   mips_ops.to_remove_breakpoint = mips_remove_breakpoint;
This page took 0.026231 seconds and 4 git commands to generate.