2003-06-11 Andrew Cagney <cagney@redhat.com>
authorAndrew Cagney <cagney@redhat.com>
Wed, 11 Jun 2003 19:38:27 +0000 (19:38 +0000)
committerAndrew Cagney <cagney@redhat.com>
Wed, 11 Jun 2003 19:38:27 +0000 (19:38 +0000)
* gdbarch.sh (DEPRECATED_REGISTER_CONVERTIBLE): Deprecate
REGISTER_CONVERTIBLE.
(DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL): Same.
(DEPRECATED_REGISTER_CONVERT_TO_RAW): Same, make "from" constant.
* gdbarch.h, gdbarch.c: Re-generate.
* arch-utils.h (deprecated_register_convertible_not): Rename
generic_register_convertible_not.
* arch-utils.c (deprecated_register_convertible_not): Rename
generic_register_convertible.
(legacy_convert_register_p, legacy_register_to_value): Update.
* sh-tdep.c (sh64_push_arguments): Update.
* m68klinux-tdep.c (m68k_linux_extract_return_value): Update.
* config/m68k/tm-delta68.h (DEPRECATED_EXTRACT_RETURN_VALUE): Update.
* m68klinux-tdep.c (m68k_linux_store_return_value): Update.
* config/m68k/tm-delta68.h (DEPRECATED_STORE_RETURN_VALUE): Update.
* arch-utils.c (legacy_value_to_register): Update.
* rs6000-tdep.c (rs6000_gdbarch_init): Update.
(rs6000_register_convert_to_raw): Make parameter "from" const.
* mips-tdep.c (mips_gdbarch_init): Update.
(mips_register_convert_to_raw): Make  parameter"virt_buf" const.
* infcmd.c (default_print_registers_info): Update.
* ia64-tdep.c (ia64_gdbarch_init): Update.
(ia64_register_convert_to_raw): Make parameter "from" const.
* i386-tdep.c (i386_gdbarch_init): Update.
(i386_register_convert_to_raw): Update.

17 files changed:
gdb/ChangeLog
gdb/arch-utils.c
gdb/arch-utils.h
gdb/config/m68k/tm-delta68.h
gdb/findvar.c
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/i386-tdep.c
gdb/ia64-tdep.c
gdb/infcmd.c
gdb/m68klinux-tdep.c
gdb/mi/ChangeLog
gdb/mi/mi-main.c
gdb/mips-tdep.c
gdb/rs6000-tdep.c
gdb/sh-tdep.c

index 3c75d911e6105a861673e378757a6ebd413d85ad..67fa68aadaf3d0496c396f877b8282d309ee2bcc 100644 (file)
@@ -1,3 +1,31 @@
+2003-06-11  Andrew Cagney  <cagney@redhat.com>
+
+       * gdbarch.sh (DEPRECATED_REGISTER_CONVERTIBLE): Deprecate
+       REGISTER_CONVERTIBLE.
+       (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL): Same.
+       (DEPRECATED_REGISTER_CONVERT_TO_RAW): Same, make "from" constant.
+       * gdbarch.h, gdbarch.c: Re-generate.
+       * arch-utils.h (deprecated_register_convertible_not): Rename
+       generic_register_convertible_not.
+       * arch-utils.c (deprecated_register_convertible_not): Rename
+       generic_register_convertible.
+       (legacy_convert_register_p, legacy_register_to_value): Update.
+       * sh-tdep.c (sh64_push_arguments): Update.
+       * m68klinux-tdep.c (m68k_linux_extract_return_value): Update.
+       * config/m68k/tm-delta68.h (DEPRECATED_EXTRACT_RETURN_VALUE): Update.
+       * m68klinux-tdep.c (m68k_linux_store_return_value): Update.
+       * config/m68k/tm-delta68.h (DEPRECATED_STORE_RETURN_VALUE): Update.
+       * arch-utils.c (legacy_value_to_register): Update.
+       * rs6000-tdep.c (rs6000_gdbarch_init): Update.
+       (rs6000_register_convert_to_raw): Make parameter "from" const.
+       * mips-tdep.c (mips_gdbarch_init): Update.
+       (mips_register_convert_to_raw): Make  parameter"virt_buf" const.
+       * infcmd.c (default_print_registers_info): Update.
+       * ia64-tdep.c (ia64_gdbarch_init): Update.
+       (ia64_register_convert_to_raw): Make parameter "from" const.
+       * i386-tdep.c (i386_gdbarch_init): Update.
+       (i386_register_convert_to_raw): Update.
+
 2003-06-11  Andrew Cagney  <cagney@redhat.com>
 
        * remote-fileio.c: Include "remote-fileio.h".
index 4238327ce72c3cdc9090528ee0564662cd185315..d252bdb98f387c6c2531d44f2b8f7c4721ebffbe 100644 (file)
@@ -232,7 +232,7 @@ default_double_format (struct gdbarch *gdbarch)
 /* Misc helper functions for targets. */
 
 int
-generic_register_convertible_not (int num)
+deprecated_register_convertible_not (int num)
 {
   return 0;
 }
@@ -435,21 +435,21 @@ legacy_pc_in_sigtramp (CORE_ADDR pc, char *name)
 int
 legacy_convert_register_p (int regnum)
 {
-  return REGISTER_CONVERTIBLE (regnum);
+  return DEPRECATED_REGISTER_CONVERTIBLE (regnum);
 }
 
 void
 legacy_register_to_value (int regnum, struct type *type,
                          char *from, char *to)
 {
-  REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to);
+  DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to);
 }
 
 void
 legacy_value_to_register (struct type *type, int regnum,
                          char *from, char *to)
 {
-  REGISTER_CONVERT_TO_RAW (type, regnum, from, to);
+  DEPRECATED_REGISTER_CONVERT_TO_RAW (type, regnum, from, to);
 }
 
 \f
index a4c59e0060f36c678b354c741ea6b6583238541c..b7b9272b13dda90962a908a53c4bc15b57ec7503 100644 (file)
@@ -32,7 +32,7 @@ struct gdbarch_info;
 extern int gdbarch_debug;
 
 /* Fallback for register convertible. */
-extern gdbarch_register_convertible_ftype generic_register_convertible_not;
+extern gdbarch_deprecated_register_convertible_ftype deprecated_register_convertible_not;
 
 extern CORE_ADDR generic_cannot_extract_struct_value_address (char *dummy);
 
index 03172b0dd75a685a92bf14b3e4e8c32e43c022af..014fc6381e109754ab0acaa9c0c5e07ac6b0ec9c 100644 (file)
@@ -49,7 +49,7 @@ struct frame_info;
 
 #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF)            \
   if (TYPE_CODE (TYPE) == TYPE_CODE_FLT)                               \
-    REGISTER_CONVERT_TO_VIRTUAL (FP0_REGNUM, TYPE,                     \
+    DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (FP0_REGNUM, TYPE,                  \
                                 &REGBUF[REGISTER_BYTE (FP0_REGNUM)],   \
                                 VALBUF);                               \
   else                                                                 \
@@ -69,7 +69,7 @@ struct frame_info;
   if (TYPE_CODE (TYPE) == TYPE_CODE_FLT)                               \
       {                                                                        \
        char raw_buf[REGISTER_RAW_SIZE (FP0_REGNUM)];                   \
-       REGISTER_CONVERT_TO_RAW (TYPE, FP0_REGNUM, VALBUF, raw_buf);    \
+       DEPRECATED_REGISTER_CONVERT_TO_RAW (TYPE, FP0_REGNUM, VALBUF, raw_buf); \
        deprecated_write_register_bytes (REGISTER_BYTE (FP0_REGNUM),            \
                              raw_buf, REGISTER_RAW_SIZE (FP0_REGNUM)); \
       }                                                                        \
index 4aa4f46c235cf33c7fe3c1a50a5e4a2b173b0e39..3155697ce84ff6c16282a432fefeaf96979b542d 100644 (file)
@@ -284,10 +284,10 @@ value_of_register (int regnum, struct frame_info *frame)
 
   /* Convert raw data to virtual format if necessary.  */
 
-  if (REGISTER_CONVERTIBLE (regnum))
+  if (DEPRECATED_REGISTER_CONVERTIBLE (regnum))
     {
-      REGISTER_CONVERT_TO_VIRTUAL (regnum, register_type (current_gdbarch, regnum),
-                                  raw_buffer, VALUE_CONTENTS_RAW (reg_val));
+      DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum, register_type (current_gdbarch, regnum),
+                                             raw_buffer, VALUE_CONTENTS_RAW (reg_val));
     }
   else if (REGISTER_RAW_SIZE (regnum) == REGISTER_VIRTUAL_SIZE (regnum))
     memcpy (VALUE_CONTENTS_RAW (reg_val), raw_buffer,
index 20b3509f9134ba6f7bfd78788fb03c3df55b0270..9aa54afcee2b7c23561158f30625df7ee39bf7f8 100644 (file)
@@ -202,9 +202,9 @@ struct gdbarch
   int believe_pcc_promotion;
   int believe_pcc_promotion_type;
   gdbarch_deprecated_get_saved_register_ftype *deprecated_get_saved_register;
-  gdbarch_register_convertible_ftype *register_convertible;
-  gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual;
-  gdbarch_register_convert_to_raw_ftype *register_convert_to_raw;
+  gdbarch_deprecated_register_convertible_ftype *deprecated_register_convertible;
+  gdbarch_deprecated_register_convert_to_virtual_ftype *deprecated_register_convert_to_virtual;
+  gdbarch_deprecated_register_convert_to_raw_ftype *deprecated_register_convert_to_raw;
   gdbarch_convert_register_p_ftype *convert_register_p;
   gdbarch_register_to_value_ftype *register_to_value;
   gdbarch_value_to_register_ftype *value_to_register;
@@ -370,9 +370,9 @@ struct gdbarch startup_gdbarch =
   0,  /* believe_pcc_promotion */
   0,  /* believe_pcc_promotion_type */
   0,  /* deprecated_get_saved_register */
-  0,  /* register_convertible */
-  0,  /* register_convert_to_virtual */
-  0,  /* register_convert_to_raw */
+  0,  /* deprecated_register_convertible */
+  0,  /* deprecated_register_convert_to_virtual */
+  0,  /* deprecated_register_convert_to_raw */
   0,  /* convert_register_p */
   0,  /* register_to_value */
   0,  /* value_to_register */
@@ -531,7 +531,7 @@ gdbarch_alloc (const struct gdbarch_info *info,
   current_gdbarch->deprecated_pc_in_call_dummy = generic_pc_in_call_dummy;
   current_gdbarch->deprecated_call_dummy_words = legacy_call_dummy_words;
   current_gdbarch->deprecated_sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
-  current_gdbarch->register_convertible = generic_register_convertible_not;
+  current_gdbarch->deprecated_register_convertible = deprecated_register_convertible_not;
   current_gdbarch->convert_register_p = legacy_convert_register_p;
   current_gdbarch->register_to_value = legacy_register_to_value;
   current_gdbarch->value_to_register = legacy_value_to_register;
@@ -672,9 +672,9 @@ verify_gdbarch (struct gdbarch *gdbarch)
   /* Skip verify of deprecated_init_frame_pc_first, has predicate */
   /* Skip verify of deprecated_init_frame_pc, has predicate */
   /* Skip verify of deprecated_get_saved_register, has predicate */
-  /* Skip verify of register_convertible, invalid_p == 0 */
-  /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
-  /* Skip verify of register_convert_to_raw, invalid_p == 0 */
+  /* Skip verify of deprecated_register_convertible, invalid_p == 0 */
+  /* Skip verify of deprecated_register_convert_to_virtual, invalid_p == 0 */
+  /* Skip verify of deprecated_register_convert_to_raw, invalid_p == 0 */
   /* Skip verify of convert_register_p, invalid_p == 0 */
   /* Skip verify of register_to_value, invalid_p == 0 */
   /* Skip verify of value_to_register, invalid_p == 0 */
@@ -1490,6 +1490,45 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
                       "gdbarch_dump: DEPRECATED_REGISTER_BYTES = %d\n",
                       DEPRECATED_REGISTER_BYTES);
 #endif
+#ifdef DEPRECATED_REGISTER_CONVERTIBLE
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: %s # %s\n",
+                      "DEPRECATED_REGISTER_CONVERTIBLE(nr)",
+                      XSTRING (DEPRECATED_REGISTER_CONVERTIBLE (nr)));
+  if (GDB_MULTI_ARCH)
+    fprintf_unfiltered (file,
+                        "gdbarch_dump: DEPRECATED_REGISTER_CONVERTIBLE = <0x%08lx>\n",
+                        (long) current_gdbarch->deprecated_register_convertible
+                        /*DEPRECATED_REGISTER_CONVERTIBLE ()*/);
+#endif
+#ifdef DEPRECATED_REGISTER_CONVERT_TO_RAW
+#if GDB_MULTI_ARCH
+  /* Macro might contain `[{}]' when not multi-arch */
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: %s # %s\n",
+                      "DEPRECATED_REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
+                      XSTRING (DEPRECATED_REGISTER_CONVERT_TO_RAW (type, regnum, from, to)));
+#endif
+  if (GDB_MULTI_ARCH)
+    fprintf_unfiltered (file,
+                        "gdbarch_dump: DEPRECATED_REGISTER_CONVERT_TO_RAW = <0x%08lx>\n",
+                        (long) current_gdbarch->deprecated_register_convert_to_raw
+                        /*DEPRECATED_REGISTER_CONVERT_TO_RAW ()*/);
+#endif
+#ifdef DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL
+#if GDB_MULTI_ARCH
+  /* Macro might contain `[{}]' when not multi-arch */
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: %s # %s\n",
+                      "DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
+                      XSTRING (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to)));
+#endif
+  if (GDB_MULTI_ARCH)
+    fprintf_unfiltered (file,
+                        "gdbarch_dump: DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n",
+                        (long) current_gdbarch->deprecated_register_convert_to_virtual
+                        /*DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL ()*/);
+#endif
 #ifdef DEPRECATED_REGISTER_SIZE
   fprintf_unfiltered (file,
                       "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
@@ -2071,45 +2110,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
                         (long) current_gdbarch->register_bytes_ok
                         /*REGISTER_BYTES_OK ()*/);
 #endif
-#ifdef REGISTER_CONVERTIBLE
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "REGISTER_CONVERTIBLE(nr)",
-                      XSTRING (REGISTER_CONVERTIBLE (nr)));
-  if (GDB_MULTI_ARCH)
-    fprintf_unfiltered (file,
-                        "gdbarch_dump: REGISTER_CONVERTIBLE = <0x%08lx>\n",
-                        (long) current_gdbarch->register_convertible
-                        /*REGISTER_CONVERTIBLE ()*/);
-#endif
-#ifdef REGISTER_CONVERT_TO_RAW
-#if GDB_MULTI_ARCH
-  /* Macro might contain `[{}]' when not multi-arch */
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
-                      XSTRING (REGISTER_CONVERT_TO_RAW (type, regnum, from, to)));
-#endif
-  if (GDB_MULTI_ARCH)
-    fprintf_unfiltered (file,
-                        "gdbarch_dump: REGISTER_CONVERT_TO_RAW = <0x%08lx>\n",
-                        (long) current_gdbarch->register_convert_to_raw
-                        /*REGISTER_CONVERT_TO_RAW ()*/);
-#endif
-#ifdef REGISTER_CONVERT_TO_VIRTUAL
-#if GDB_MULTI_ARCH
-  /* Macro might contain `[{}]' when not multi-arch */
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
-                      XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to)));
-#endif
-  if (GDB_MULTI_ARCH)
-    fprintf_unfiltered (file,
-                        "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n",
-                        (long) current_gdbarch->register_convert_to_virtual
-                        /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
-#endif
 #ifdef REGISTER_NAME
   fprintf_unfiltered (file,
                       "gdbarch_dump: %s # %s\n",
@@ -4105,60 +4105,60 @@ set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch,
 }
 
 int
-gdbarch_register_convertible (struct gdbarch *gdbarch, int nr)
+gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, int nr)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->register_convertible == 0)
+  if (gdbarch->deprecated_register_convertible == 0)
     internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_register_convertible invalid");
+                    "gdbarch: gdbarch_deprecated_register_convertible invalid");
   if (gdbarch_debug >= 2)
-    fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n");
-  return gdbarch->register_convertible (nr);
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convertible called\n");
+  return gdbarch->deprecated_register_convertible (nr);
 }
 
 void
-set_gdbarch_register_convertible (struct gdbarch *gdbarch,
-                                  gdbarch_register_convertible_ftype register_convertible)
+set_gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch,
+                                             gdbarch_deprecated_register_convertible_ftype deprecated_register_convertible)
 {
-  gdbarch->register_convertible = register_convertible;
+  gdbarch->deprecated_register_convertible = deprecated_register_convertible;
 }
 
 void
-gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
+gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->register_convert_to_virtual == 0)
+  if (gdbarch->deprecated_register_convert_to_virtual == 0)
     internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_register_convert_to_virtual invalid");
+                    "gdbarch: gdbarch_deprecated_register_convert_to_virtual invalid");
   if (gdbarch_debug >= 2)
-    fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n");
-  gdbarch->register_convert_to_virtual (regnum, type, from, to);
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convert_to_virtual called\n");
+  gdbarch->deprecated_register_convert_to_virtual (regnum, type, from, to);
 }
 
 void
-set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch,
-                                         gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual)
+set_gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch,
+                                                    gdbarch_deprecated_register_convert_to_virtual_ftype deprecated_register_convert_to_virtual)
 {
-  gdbarch->register_convert_to_virtual = register_convert_to_virtual;
+  gdbarch->deprecated_register_convert_to_virtual = deprecated_register_convert_to_virtual;
 }
 
 void
-gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
+gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, const char *from, char *to)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->register_convert_to_raw == 0)
+  if (gdbarch->deprecated_register_convert_to_raw == 0)
     internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_register_convert_to_raw invalid");
+                    "gdbarch: gdbarch_deprecated_register_convert_to_raw invalid");
   if (gdbarch_debug >= 2)
-    fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n");
-  gdbarch->register_convert_to_raw (type, regnum, from, to);
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convert_to_raw called\n");
+  gdbarch->deprecated_register_convert_to_raw (type, regnum, from, to);
 }
 
 void
-set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch,
-                                     gdbarch_register_convert_to_raw_ftype register_convert_to_raw)
+set_gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch,
+                                                gdbarch_deprecated_register_convert_to_raw_ftype deprecated_register_convert_to_raw)
 {
-  gdbarch->register_convert_to_raw = register_convert_to_raw;
+  gdbarch->deprecated_register_convert_to_raw = deprecated_register_convert_to_raw;
 }
 
 int
index 778d7a3c1a29df23037ec2c4659cc19d4dca0ba7..f45713caf714b2fd5c989e01d8c3beaa283b1cf4 100644 (file)
@@ -1447,49 +1447,58 @@ extern void set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch,
 #define DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) (gdbarch_deprecated_get_saved_register (current_gdbarch, raw_buffer, optimized, addrp, frame, regnum, lval))
 #endif
 
+/* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al.
+   For raw <-> cooked register conversions, replaced by pseudo registers. */
+
 /* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (REGISTER_CONVERTIBLE)
-#define REGISTER_CONVERTIBLE(nr) (generic_register_convertible_not (nr))
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_REGISTER_CONVERTIBLE)
+#define DEPRECATED_REGISTER_CONVERTIBLE(nr) (deprecated_register_convertible_not (nr))
 #endif
 
-typedef int (gdbarch_register_convertible_ftype) (int nr);
-extern int gdbarch_register_convertible (struct gdbarch *gdbarch, int nr);
-extern void set_gdbarch_register_convertible (struct gdbarch *gdbarch, gdbarch_register_convertible_ftype *register_convertible);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_CONVERTIBLE)
-#error "Non multi-arch definition of REGISTER_CONVERTIBLE"
+typedef int (gdbarch_deprecated_register_convertible_ftype) (int nr);
+extern int gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, int nr);
+extern void set_gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, gdbarch_deprecated_register_convertible_ftype *deprecated_register_convertible);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERTIBLE)
+#error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERTIBLE"
 #endif
-#if !defined (REGISTER_CONVERTIBLE)
-#define REGISTER_CONVERTIBLE(nr) (gdbarch_register_convertible (current_gdbarch, nr))
+#if !defined (DEPRECATED_REGISTER_CONVERTIBLE)
+#define DEPRECATED_REGISTER_CONVERTIBLE(nr) (gdbarch_deprecated_register_convertible (current_gdbarch, nr))
 #endif
 
+/* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al.
+   For raw <-> cooked register conversions, replaced by pseudo registers. */
+
 /* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (REGISTER_CONVERT_TO_VIRTUAL)
-#define REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (internal_error (__FILE__, __LINE__, "REGISTER_CONVERT_TO_VIRTUAL"), 0)
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL)
+#define DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (internal_error (__FILE__, __LINE__, "DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL"), 0)
 #endif
 
-typedef void (gdbarch_register_convert_to_virtual_ftype) (int regnum, struct type *type, char *from, char *to);
-extern void gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to);
-extern void set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_CONVERT_TO_VIRTUAL)
-#error "Non multi-arch definition of REGISTER_CONVERT_TO_VIRTUAL"
+typedef void (gdbarch_deprecated_register_convert_to_virtual_ftype) (int regnum, struct type *type, char *from, char *to);
+extern void gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to);
+extern void set_gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, gdbarch_deprecated_register_convert_to_virtual_ftype *deprecated_register_convert_to_virtual);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL)
+#error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL"
 #endif
-#if !defined (REGISTER_CONVERT_TO_VIRTUAL)
-#define REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (gdbarch_register_convert_to_virtual (current_gdbarch, regnum, type, from, to))
+#if !defined (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL)
+#define DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (gdbarch_deprecated_register_convert_to_virtual (current_gdbarch, regnum, type, from, to))
 #endif
 
+/* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al.
+   For raw <-> cooked register conversions, replaced by pseudo registers. */
+
 /* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (REGISTER_CONVERT_TO_RAW)
-#define REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (internal_error (__FILE__, __LINE__, "REGISTER_CONVERT_TO_RAW"), 0)
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_REGISTER_CONVERT_TO_RAW)
+#define DEPRECATED_REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (internal_error (__FILE__, __LINE__, "DEPRECATED_REGISTER_CONVERT_TO_RAW"), 0)
 #endif
 
-typedef void (gdbarch_register_convert_to_raw_ftype) (struct type *type, int regnum, char *from, char *to);
-extern void gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to);
-extern void set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, gdbarch_register_convert_to_raw_ftype *register_convert_to_raw);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_CONVERT_TO_RAW)
-#error "Non multi-arch definition of REGISTER_CONVERT_TO_RAW"
+typedef void (gdbarch_deprecated_register_convert_to_raw_ftype) (struct type *type, int regnum, const char *from, char *to);
+extern void gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, const char *from, char *to);
+extern void set_gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, gdbarch_deprecated_register_convert_to_raw_ftype *deprecated_register_convert_to_raw);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERT_TO_RAW)
+#error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERT_TO_RAW"
 #endif
-#if !defined (REGISTER_CONVERT_TO_RAW)
-#define REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (gdbarch_register_convert_to_raw (current_gdbarch, type, regnum, from, to))
+#if !defined (DEPRECATED_REGISTER_CONVERT_TO_RAW)
+#define DEPRECATED_REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (gdbarch_deprecated_register_convert_to_raw (current_gdbarch, type, regnum, from, to))
 #endif
 
 /* Default (function) for non- multi-arch platforms. */
index bfeb2c51f608f26f805a9d496f8692c0cb1642df..201ea6551c3885d6df15107c47e05ca82773661e 100755 (executable)
@@ -555,9 +555,15 @@ v:2:BELIEVE_PCC_PROMOTION:int:believe_pcc_promotion:::::::
 v::BELIEVE_PCC_PROMOTION_TYPE:int:believe_pcc_promotion_type:::::::
 F:2:DEPRECATED_GET_SAVED_REGISTER:void:deprecated_get_saved_register:char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval:raw_buffer, optimized, addrp, frame, regnum, lval
 #
-f:2:REGISTER_CONVERTIBLE:int:register_convertible:int nr:nr:::generic_register_convertible_not::0
-f:2:REGISTER_CONVERT_TO_VIRTUAL:void:register_convert_to_virtual:int regnum, struct type *type, char *from, char *to:regnum, type, from, to:::0::0
-f:2:REGISTER_CONVERT_TO_RAW:void:register_convert_to_raw:struct type *type, int regnum, char *from, char *to:type, regnum, from, to:::0::0
+# For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al.
+# For raw <-> cooked register conversions, replaced by pseudo registers.
+f:2:DEPRECATED_REGISTER_CONVERTIBLE:int:deprecated_register_convertible:int nr:nr:::deprecated_register_convertible_not::0
+# For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al.
+# For raw <-> cooked register conversions, replaced by pseudo registers.
+f:2:DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL:void:deprecated_register_convert_to_virtual:int regnum, struct type *type, char *from, char *to:regnum, type, from, to:::0::0
+# For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al.
+# For raw <-> cooked register conversions, replaced by pseudo registers.
+f:2:DEPRECATED_REGISTER_CONVERT_TO_RAW:void:deprecated_register_convert_to_raw:struct type *type, int regnum, const char *from, char *to:type, regnum, from, to:::0::0
 #
 f:1:CONVERT_REGISTER_P:int:convert_register_p:int regnum:regnum::0:legacy_convert_register_p::0
 f:1:REGISTER_TO_VALUE:void:register_to_value:int regnum, struct type *type, char *from, char *to:regnum, type, from, to::0:legacy_register_to_value::0
index 6194e6821970ba14f2247c9a3e5b3aceb20f60a3..80f69e09d7959890de4e00fb63709dbe5fa93b23 100644 (file)
@@ -1359,7 +1359,7 @@ i386_register_convert_to_virtual (int regnum, struct type *type,
 
 static void
 i386_register_convert_to_raw (struct type *type, int regnum,
-                             char *from, char *to)
+                             const char *from, char *to)
 {
   gdb_assert (i386_fp_regnum_p (regnum));
 
@@ -1686,10 +1686,9 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   /* Call dummy code.  */
   set_gdbarch_push_dummy_call (gdbarch, i386_push_dummy_call);
 
-  set_gdbarch_register_convertible (gdbarch, i386_register_convertible);
-  set_gdbarch_register_convert_to_virtual (gdbarch,
-                                          i386_register_convert_to_virtual);
-  set_gdbarch_register_convert_to_raw (gdbarch, i386_register_convert_to_raw);
+  set_gdbarch_deprecated_register_convertible (gdbarch, i386_register_convertible);
+  set_gdbarch_deprecated_register_convert_to_virtual (gdbarch, i386_register_convert_to_virtual);
+  set_gdbarch_deprecated_register_convert_to_raw (gdbarch, i386_register_convert_to_raw);
 
   set_gdbarch_extract_return_value (gdbarch, i386_extract_return_value);
   set_gdbarch_store_return_value (gdbarch, i386_store_return_value);
index 9a93586f3864173c87b614e9861920f14c6444fd..9d829c5821195e0a1313d44e124cc02d8202ff20 100644 (file)
@@ -281,7 +281,7 @@ ia64_register_convert_to_virtual (int regnum, struct type *type,
 
 static void
 ia64_register_convert_to_raw (struct type *type, int regnum,
-                              char *from, char *to)
+                              const char *from, char *to)
 {
   if (regnum >= IA64_FR0_REGNUM && regnum <= IA64_FR127_REGNUM)
     {
@@ -2274,9 +2274,9 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, ia64_frame_init_saved_regs);
   set_gdbarch_deprecated_get_saved_register (gdbarch, ia64_get_saved_register);
 
-  set_gdbarch_register_convertible (gdbarch, ia64_register_convertible);
-  set_gdbarch_register_convert_to_virtual (gdbarch, ia64_register_convert_to_virtual);
-  set_gdbarch_register_convert_to_raw (gdbarch, ia64_register_convert_to_raw);
+  set_gdbarch_deprecated_register_convertible (gdbarch, ia64_register_convertible);
+  set_gdbarch_deprecated_register_convert_to_virtual (gdbarch, ia64_register_convert_to_virtual);
+  set_gdbarch_deprecated_register_convert_to_raw (gdbarch, ia64_register_convert_to_raw);
 
   set_gdbarch_use_struct_convention (gdbarch, ia64_use_struct_convention);
   set_gdbarch_deprecated_extract_return_value (gdbarch, ia64_extract_return_value);
index de6c319608d9a2faf9c2d14ab150df6d34b57831..0ed0ce2f080510e8a29bb9f3aefbbf3c8484b7c4 100644 (file)
@@ -1551,9 +1551,9 @@ default_print_registers_info (struct gdbarch *gdbarch,
          The function frame_register_read() should have returned the
          pre-cooked register so no conversion is necessary.  */
       /* Convert raw data to virtual format if necessary.  */
-      if (REGISTER_CONVERTIBLE (i))
+      if (DEPRECATED_REGISTER_CONVERTIBLE (i))
        {
-         REGISTER_CONVERT_TO_VIRTUAL (i, register_type (current_gdbarch, i),
+         DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (i, register_type (current_gdbarch, i),
                                       raw_buffer, virtual_buffer);
        }
       else
index 612f9fd5d9dfc92b9b316f7df09531a8850e0cf6..1fa9f74965039ad6247f0eabdaa727972c9955c1 100644 (file)
@@ -149,9 +149,9 @@ m68k_linux_extract_return_value (struct type *type, char *regbuf, char *valbuf)
 {
   if (TYPE_CODE (type) == TYPE_CODE_FLT)
     {
-       REGISTER_CONVERT_TO_VIRTUAL (FP0_REGNUM, type,
-                                   regbuf + REGISTER_BYTE (FP0_REGNUM),
-                                   valbuf);
+      DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (FP0_REGNUM, type,
+                                             regbuf + REGISTER_BYTE (FP0_REGNUM),
+                                             valbuf);
     }
   else if (TYPE_CODE (type) == TYPE_CODE_PTR)
     memcpy (valbuf, regbuf + REGISTER_BYTE (M68K_A0_REGNUM),
@@ -171,7 +171,7 @@ m68k_linux_store_return_value (struct type *type, char *valbuf)
   if (TYPE_CODE (type) == TYPE_CODE_FLT)
     {
       char raw_buffer[REGISTER_RAW_SIZE (FP0_REGNUM)];
-      REGISTER_CONVERT_TO_RAW (type, FP0_REGNUM, valbuf, raw_buffer);
+      DEPRECATED_REGISTER_CONVERT_TO_RAW (type, FP0_REGNUM, valbuf, raw_buffer);
       deprecated_write_register_bytes (REGISTER_BYTE (FP0_REGNUM),
                                       raw_buffer, TYPE_LENGTH (type));
     }
index e4e74dbad418790d3b5c84a7468800f1103edfaf..37705d5b8541e384217088ef80da89d635c9ebcc 100644 (file)
@@ -1,3 +1,8 @@
+2003-06-11  Andrew Cagney  <cagney@redhat.com>
+
+       * mi-main.c (get_register): Replace REGISTER_CONVERTIBLE with
+       DEPRECATED_REGISTER_CONVERTIBLE.
+
 2003-06-08  Andrew Cagney  <cagney@redhat.com>
 
        * mi-parse.c (_initialize_mi_parse): Delete function.
index 7ac56509dcf5d78a152f7a5b77e685e038b2b2b4..5e55913fb94a34ac514c8a117a4498b3eb6b62b4 100644 (file)
@@ -536,9 +536,9 @@ get_register (int regnum, int format)
 
   /* Convert raw data to virtual format if necessary.  */
 
-  if (REGISTER_CONVERTIBLE (regnum))
+  if (DEPRECATED_REGISTER_CONVERTIBLE (regnum))
     {
-      REGISTER_CONVERT_TO_VIRTUAL (regnum,
+      DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum,
                                   register_type (current_gdbarch, regnum),
                                   raw_buffer, virtual_buffer);
     }
index a4e1d40da6b03a8713530275c92d8d96db6919cb..0952019ac9b2f00f691ab57337f8a5ed49076793 100644 (file)
@@ -621,7 +621,7 @@ mips_register_convert_to_virtual (int n, struct type *virtual_type,
 
 static void
 mips_register_convert_to_raw (struct type *virtual_type, int n,
-                             char *virt_buf, char *raw_buf)
+                             const char *virt_buf, char *raw_buf)
 {
   memset (raw_buf, 0, REGISTER_RAW_SIZE (n));
   if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
@@ -5961,11 +5961,9 @@ mips_gdbarch_init (struct gdbarch_info info,
   set_gdbarch_deprecated_pop_frame (gdbarch, mips_pop_frame);
   set_gdbarch_frame_align (gdbarch, mips_frame_align);
   set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
-  set_gdbarch_register_convertible (gdbarch, mips_register_convertible);
-  set_gdbarch_register_convert_to_virtual (gdbarch, 
-                                          mips_register_convert_to_virtual);
-  set_gdbarch_register_convert_to_raw (gdbarch, 
-                                      mips_register_convert_to_raw);
+  set_gdbarch_deprecated_register_convertible (gdbarch, mips_register_convertible);
+  set_gdbarch_deprecated_register_convert_to_virtual (gdbarch, mips_register_convert_to_virtual);
+  set_gdbarch_deprecated_register_convert_to_raw (gdbarch, mips_register_convert_to_raw);
 
   set_gdbarch_deprecated_frame_chain (gdbarch, mips_frame_chain);
   set_gdbarch_frameless_function_invocation (gdbarch, 
index 42a90b09779bf516759b005a108369239e950c21..595758e8d0af785da3f6478e15daafbc83ab794b 100644 (file)
@@ -1944,7 +1944,7 @@ rs6000_register_convert_to_virtual (int n, struct type *type,
 
 static void
 rs6000_register_convert_to_raw (struct type *type, int n,
-                               char *from, char *to)
+                               const char *from, char *to)
 {
   if (TYPE_LENGTH (type) != REGISTER_RAW_SIZE (n))
     {
@@ -2944,9 +2944,9 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_deprecated_push_return_address (gdbarch, ppc_push_return_address);
   set_gdbarch_believe_pcc_promotion (gdbarch, 1);
 
-  set_gdbarch_register_convertible (gdbarch, rs6000_register_convertible);
-  set_gdbarch_register_convert_to_virtual (gdbarch, rs6000_register_convert_to_virtual);
-  set_gdbarch_register_convert_to_raw (gdbarch, rs6000_register_convert_to_raw);
+  set_gdbarch_deprecated_register_convertible (gdbarch, rs6000_register_convertible);
+  set_gdbarch_deprecated_register_convert_to_virtual (gdbarch, rs6000_register_convert_to_virtual);
+  set_gdbarch_deprecated_register_convert_to_raw (gdbarch, rs6000_register_convert_to_raw);
   set_gdbarch_stab_reg_to_regnum (gdbarch, rs6000_stab_reg_to_regnum);
   /* Note: kevinb/2002-04-12: I'm not convinced that rs6000_push_arguments()
      is correct for the SysV ABI when the wordsize is 8, but I'm also
index bf77aae62987f7671bf0eafde35cda6c419e3089..cfa53bfd7a35b7625fddf4766a598ac7f324c614 100644 (file)
@@ -2297,8 +2297,9 @@ sh64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
                    if (TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE)
                      {
                        memset (valbuf_tmp, 0, sizeof (valbuf_tmp));
-                       REGISTER_CONVERT_TO_VIRTUAL (regnum,
-                                                    type, val, valbuf_tmp);
+                       DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum,
+                                                               type, val,
+                                                               valbuf_tmp);
                        val = valbuf_tmp;
                      }
 #endif