* alpha-nat.c (fetch_osf_core_registers): Use ALPHA_REGISTER_SIZE
authorRichard Henderson <rth@redhat.com>
Sun, 1 Jun 2003 18:44:13 +0000 (18:44 +0000)
committerRichard Henderson <rth@redhat.com>
Sun, 1 Jun 2003 18:44:13 +0000 (18:44 +0000)
        instead of ALPHA_MAX_REGISTER_RAW_SIZE.
        (supply_gregset): Likewise.
        * alpha-tdep.c (alpha_store_return_value): Likewise.
        (alpha_get_longjmp_target): Likewise.
        (alpha_register_name): Constify array.
        (alpha_gdbarch_init): Remove deprecated_fp_regnum,
        deprecated_register_size, deprecated_register_bytes,
        deprecated_max_register_raw_size, deprecated_max_register_virtual_size.
        * alpha-tdep.h (ALPHA_MAX_REGISTER_RAW_SIZE): Remove.
        (ALPHA_MAX_REGISTER_VIRTUAL_SIZE): Remove.

gdb/ChangeLog
gdb/alpha-nat.c
gdb/alpha-tdep.c
gdb/alpha-tdep.h

index 3a795f630d277b4d78257f0c1f96afa71dbe6d4c..279d9819417485f2b01c8a4f45ffaf365eefaa7b 100644 (file)
@@ -1,3 +1,17 @@
+2003-06-01  Richard Henderson  <rth@redhat.com>
+
+        * alpha-nat.c (fetch_osf_core_registers): Use ALPHA_REGISTER_SIZE
+        instead of ALPHA_MAX_REGISTER_RAW_SIZE.
+        (supply_gregset): Likewise.
+        * alpha-tdep.c (alpha_store_return_value): Likewise.
+        (alpha_get_longjmp_target): Likewise.
+        (alpha_register_name): Constify array.
+        (alpha_gdbarch_init): Remove deprecated_fp_regnum,
+        deprecated_register_size, deprecated_register_bytes,
+        deprecated_max_register_raw_size, deprecated_max_register_virtual_size.
+        * alpha-tdep.h (ALPHA_MAX_REGISTER_RAW_SIZE): Remove.
+        (ALPHA_MAX_REGISTER_VIRTUAL_SIZE): Remove.
+
 2003-06-01  Richard Henderson  <rth@redhat.com>
 
        * alpha-tdep.c (alpha_push_dummy_call): Store sp.  Tidy copies
index af0a336cf6ab3b580b539a2e6ef8c0efdb25eb84..7c272b34068a65ac0761aec2ef7e58b261b00085 100644 (file)
@@ -94,8 +94,7 @@ fetch_osf_core_registers (char *core_reg_sect, unsigned core_reg_size,
     EF_PC, -1
 #endif
   };
-  static char zerobuf[ALPHA_MAX_REGISTER_RAW_SIZE] =
-  {0};
+  static char zerobuf[ALPHA_REGISTER_SIZE] = {0};
 
   for (regno = 0; regno < NUM_REGS; regno++)
     {
@@ -202,8 +201,7 @@ supply_gregset (gdb_gregset_t *gregsetp)
 {
   register int regi;
   register long *regp = ALPHA_REGSET_BASE (gregsetp);
-  static char zerobuf[ALPHA_MAX_REGISTER_RAW_SIZE] =
-  {0};
+  static char zerobuf[ALPHA_REGISTER_SIZE] = {0};
 
   for (regi = 0; regi < 31; regi++)
     supply_register (regi, (char *) (regp + regi));
index a591d08f619fd66013cc388d378db8db3032c227..96ae1205d8e9c61852b2bd1fc3f5129c92487951 100644 (file)
@@ -47,7 +47,7 @@
 static const char *
 alpha_register_name (int regno)
 {
-  static char *register_names[] =
+  static const char * const register_names[] =
   {
     "v0",   "t0",   "t1",   "t2",   "t3",   "t4",   "t5",   "t6",
     "t7",   "s0",   "s1",   "s2",   "s3",   "s4",   "s5",   "fp",
@@ -61,10 +61,10 @@ alpha_register_name (int regno)
   };
 
   if (regno < 0)
-    return (NULL);
+    return NULL;
   if (regno >= (sizeof(register_names) / sizeof(*register_names)))
-    return (NULL);
-  return (register_names[regno]);
+    return NULL;
+  return register_names[regno];
 }
 
 static int
@@ -348,14 +348,14 @@ alpha_extract_return_value (struct type *valtype,
 static void
 alpha_store_return_value (struct type *valtype, char *valbuf)
 {
-  char raw_buffer[ALPHA_MAX_REGISTER_RAW_SIZE];
+  char raw_buffer[ALPHA_REGISTER_SIZE];
   int regnum = ALPHA_V0_REGNUM;
   int length = TYPE_LENGTH (valtype);
 
   if (TYPE_CODE (valtype) == TYPE_CODE_FLT)
     {
       regnum = FP0_REGNUM;
-      length = REGISTER_RAW_SIZE (regnum);
+      length = ALPHA_REGISTER_SIZE;
       alpha_register_convert_to_raw (valtype, regnum, valbuf, raw_buffer);
     }
   else
@@ -510,7 +510,7 @@ alpha_get_longjmp_target (CORE_ADDR *pc)
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
   CORE_ADDR jb_addr;
-  char raw_buffer[ALPHA_MAX_REGISTER_RAW_SIZE];
+  char raw_buffer[ALPHA_REGISTER_SIZE];
 
   jb_addr = read_register (ALPHA_A0_REGNUM);
 
@@ -1243,19 +1243,13 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   /* Register info */
   set_gdbarch_num_regs (gdbarch, ALPHA_NUM_REGS);
   set_gdbarch_sp_regnum (gdbarch, ALPHA_SP_REGNUM);
-  set_gdbarch_deprecated_fp_regnum (gdbarch, ALPHA_FP_REGNUM);
   set_gdbarch_pc_regnum (gdbarch, ALPHA_PC_REGNUM);
   set_gdbarch_fp0_regnum (gdbarch, ALPHA_FP0_REGNUM);
 
   set_gdbarch_register_name (gdbarch, alpha_register_name);
-  set_gdbarch_deprecated_register_size (gdbarch, ALPHA_REGISTER_SIZE);
-  set_gdbarch_deprecated_register_bytes (gdbarch, ALPHA_REGISTER_BYTES);
   set_gdbarch_register_byte (gdbarch, alpha_register_byte);
   set_gdbarch_register_raw_size (gdbarch, alpha_register_raw_size);
-  set_gdbarch_deprecated_max_register_raw_size (gdbarch, ALPHA_MAX_REGISTER_RAW_SIZE);
   set_gdbarch_register_virtual_size (gdbarch, alpha_register_virtual_size);
-  set_gdbarch_deprecated_max_register_virtual_size (gdbarch,
-                                         ALPHA_MAX_REGISTER_VIRTUAL_SIZE);
   set_gdbarch_register_virtual_type (gdbarch, alpha_register_virtual_type);
 
   set_gdbarch_cannot_fetch_register (gdbarch, alpha_cannot_fetch_register);
index 5def15a845424db25219563a05f4ef5b1b8f64f5..d7266bebe6f2e98ce7005646711e60d08e065707 100644 (file)
    register state.  */
 #define ALPHA_REGISTER_BYTES (ALPHA_NUM_REGS * 8)
 
-/* Largest value REGISTER_RAW_SIZE can have.  */
-#define ALPHA_MAX_REGISTER_RAW_SIZE 8
-
-/* Largest value REGISTER_VIRTUAL_SIZE can have.  */
-#define ALPHA_MAX_REGISTER_VIRTUAL_SIZE 8
-
 /* Register numbers of various important registers.  Note that most of
    these values are "real" register numbers, and correspond to the
    general registers of the machine, and DEPRECATED_FP_REGNUM is a