PR 1150
[deliverable/binutils-gdb.git] / gdb / rom68k-rom.c
index cc0586f8ed50108e85b72d061e465dbc2229b7fe..2c1b9197057fc9f3ac90ef06dc24a83d9839505c 100644 (file)
@@ -1,5 +1,5 @@
 /* Remote target glue for the ROM68K ROM monitor.
-   Copyright 1988, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001
+   Copyright (C) 1988, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -16,8 +16,8 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
+   Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
 
 #include "defs.h"
 #include "gdbcore.h"
@@ -27,6 +27,8 @@
 #include "regcache.h"
 #include "value.h"
 
+#include "m68k-tdep.h"
+
 static void rom68k_open (char *args, int from_tty);
 
 /* Return true if C is a hex digit.
@@ -52,7 +54,7 @@ hex_digit_value (int a)
   else if (a >= 'A' && a <= 'F')
     return a - 'A' + 10;
   else
-    error ("Invalid hex digit %d", a);
+    error (_("Invalid hex digit %d"), a);
 }
 
 
@@ -86,7 +88,7 @@ static char *
 rom68k_supply_one_register (int regno, unsigned char *hex)
 {
   ULONGEST value;
-  unsigned char regbuf[MAX_REGISTER_RAW_SIZE];
+  unsigned char regbuf[MAX_REGISTER_SIZE];
 
   value = 0;
   while (*hex != '\0')
@@ -99,8 +101,8 @@ rom68k_supply_one_register (int regno, unsigned char *hex)
   while (is_whitespace (*hex))
     hex++;
 
-  store_unsigned_integer (regbuf, REGISTER_RAW_SIZE (regno), value);
-  supply_register (regno, regbuf);
+  store_unsigned_integer (regbuf, register_size (current_gdbarch, regno), value);
+  regcache_raw_supply (current_regcache, regno, regbuf);
 
   return hex;
 }
@@ -129,13 +131,13 @@ rom68k_supply_register (char *regname, int regnamelen, char *val, int vallen)
       case 'D':
        if (regname[1] != 'R')
          break;
-       regno = D0_REGNUM;
+       regno = M68K_D0_REGNUM;
        numregs = 8;
        break;
       case 'A':
        if (regname[1] != 'R')
          break;
-       regno = A0_REGNUM;
+       regno = M68K_A0_REGNUM;
        numregs = 7;
        break;
       }
@@ -244,6 +246,8 @@ rom68k_open (char *args, int from_tty)
   monitor_open (args, &rom68k_cmds, from_tty);
 }
 
+extern initialize_file_ftype _initialize_rom68k; /* -Wmissing-prototypes */
+
 void
 _initialize_rom68k (void)
 {
This page took 0.039556 seconds and 4 git commands to generate.