+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".
/* Misc helper functions for targets. */
int
-generic_register_convertible_not (int num)
+deprecated_register_convertible_not (int num)
{
return 0;
}
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
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);
#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, \
®BUF[REGISTER_BYTE (FP0_REGNUM)], \
VALBUF); \
else \
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)); \
} \
/* 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,
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;
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 */
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;
/* 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 */
"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",
(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",
}
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
#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. */
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
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));
/* 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);
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)
{
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);
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
{
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),
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));
}
+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.
/* 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);
}
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)
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,
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))
{
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
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