aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/gdbarch.c216
-rw-r--r--gdb/gdbarch.h225
-rwxr-xr-xgdb/gdbarch.sh47
4 files changed, 257 insertions, 237 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5237edf..ee5c6be 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2003-06-13 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh: Document what UNWIND_DUMMY_ID replaces. Clarify
+ when deprecated REGISTER macros can be deleted.
+ * gdbarch.h, gdbarch.c: Re-generate.
+
2003-06-13 Jim Blandy <jimb@redhat.com>
* solib-svr4.c (solib_break_names): Recognize the 64-bit PowerPC
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 03d6b99..482103a 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -147,7 +147,6 @@ struct gdbarch
int char_signed;
gdbarch_read_pc_ftype *read_pc;
gdbarch_write_pc_ftype *write_pc;
- gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp;
gdbarch_read_sp_ftype *read_sp;
gdbarch_deprecated_dummy_write_sp_ftype *deprecated_dummy_write_sp;
gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
@@ -156,7 +155,6 @@ struct gdbarch
int num_regs;
int num_pseudo_regs;
int sp_regnum;
- int deprecated_fp_regnum;
int pc_regnum;
int ps_regnum;
int fp0_regnum;
@@ -176,6 +174,10 @@ struct gdbarch
gdbarch_deprecated_register_virtual_size_ftype *deprecated_register_virtual_size;
int deprecated_max_register_raw_size;
int deprecated_max_register_virtual_size;
+ gdbarch_unwind_dummy_id_ftype *unwind_dummy_id;
+ gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos;
+ int deprecated_fp_regnum;
+ gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp;
gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info;
gdbarch_print_registers_info_ftype *print_registers_info;
gdbarch_print_float_info_ftype *print_float_info;
@@ -252,8 +254,6 @@ struct gdbarch
gdbarch_frame_align_ftype *frame_align;
int deprecated_extra_stack_alignment_needed;
gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr;
- gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos;
- gdbarch_unwind_dummy_id_ftype *unwind_dummy_id;
int parm_boundary;
const struct floatformat * float_format;
const struct floatformat * double_format;
@@ -315,7 +315,6 @@ struct gdbarch startup_gdbarch =
1, /* char_signed */
0, /* read_pc */
0, /* write_pc */
- 0, /* deprecated_target_read_fp */
0, /* read_sp */
0, /* deprecated_dummy_write_sp */
0, /* virtual_frame_pointer */
@@ -324,7 +323,6 @@ struct gdbarch startup_gdbarch =
0, /* num_regs */
0, /* num_pseudo_regs */
-1, /* sp_regnum */
- -1, /* deprecated_fp_regnum */
-1, /* pc_regnum */
-1, /* ps_regnum */
0, /* fp0_regnum */
@@ -344,6 +342,10 @@ struct gdbarch startup_gdbarch =
generic_register_size, /* deprecated_register_virtual_size */
0, /* deprecated_max_register_raw_size */
0, /* deprecated_max_register_virtual_size */
+ 0, /* unwind_dummy_id */
+ 0, /* save_dummy_frame_tos */
+ -1, /* deprecated_fp_regnum */
+ 0, /* deprecated_target_read_fp */
0, /* deprecated_do_registers_info */
default_print_registers_info, /* print_registers_info */
0, /* print_float_info */
@@ -420,8 +422,6 @@ struct gdbarch startup_gdbarch =
0, /* frame_align */
0, /* deprecated_extra_stack_alignment_needed */
0, /* reg_struct_has_addr */
- 0, /* save_dummy_frame_tos */
- 0, /* unwind_dummy_id */
0, /* parm_boundary */
0, /* float_format */
0, /* double_format */
@@ -507,7 +507,6 @@ gdbarch_alloc (const struct gdbarch_info *info,
current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
current_gdbarch->num_regs = -1;
current_gdbarch->sp_regnum = -1;
- current_gdbarch->deprecated_fp_regnum = -1;
current_gdbarch->pc_regnum = -1;
current_gdbarch->ps_regnum = -1;
current_gdbarch->fp0_regnum = -1;
@@ -521,6 +520,7 @@ gdbarch_alloc (const struct gdbarch_info *info,
current_gdbarch->deprecated_register_byte = generic_register_byte;
current_gdbarch->deprecated_register_raw_size = generic_register_size;
current_gdbarch->deprecated_register_virtual_size = generic_register_size;
+ current_gdbarch->deprecated_fp_regnum = -1;
current_gdbarch->print_registers_info = default_print_registers_info;
current_gdbarch->register_sim_regno = legacy_register_sim_regno;
current_gdbarch->cannot_fetch_register = cannot_register_not;
@@ -622,7 +622,6 @@ verify_gdbarch (struct gdbarch *gdbarch)
gdbarch->char_signed = 1;
/* Skip verify of read_pc, has predicate */
/* Skip verify of write_pc, invalid_p == 0 */
- /* Skip verify of deprecated_target_read_fp, has predicate */
/* Skip verify of read_sp, has predicate */
/* Skip verify of deprecated_dummy_write_sp, has predicate */
/* Skip verify of virtual_frame_pointer, invalid_p == 0 */
@@ -633,7 +632,6 @@ verify_gdbarch (struct gdbarch *gdbarch)
fprintf_unfiltered (log, "\n\tnum_regs");
/* Skip verify of num_pseudo_regs, invalid_p == 0 */
/* Skip verify of sp_regnum, invalid_p == 0 */
- /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
/* Skip verify of pc_regnum, invalid_p == 0 */
/* Skip verify of ps_regnum, invalid_p == 0 */
/* Skip verify of fp0_regnum, invalid_p == 0 */
@@ -651,6 +649,10 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of deprecated_register_virtual_size, invalid_p == 0 */
/* Skip verify of deprecated_max_register_raw_size, has predicate */
/* Skip verify of deprecated_max_register_virtual_size, has predicate */
+ /* Skip verify of unwind_dummy_id, has predicate */
+ /* Skip verify of save_dummy_frame_tos, has predicate */
+ /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
+ /* Skip verify of deprecated_target_read_fp, has predicate */
/* Skip verify of deprecated_do_registers_info, has predicate */
/* Skip verify of print_registers_info, invalid_p == 0 */
/* Skip verify of print_float_info, has predicate */
@@ -732,8 +734,6 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of frame_align, has predicate */
/* Skip verify of deprecated_extra_stack_alignment_needed, invalid_p == 0 */
/* Skip verify of reg_struct_has_addr, has predicate */
- /* Skip verify of save_dummy_frame_tos, has predicate */
- /* Skip verify of unwind_dummy_id, has predicate */
if (gdbarch->float_format == 0)
gdbarch->float_format = default_float_format (gdbarch);
if (gdbarch->double_format == 0)
@@ -2956,32 +2956,6 @@ set_gdbarch_write_pc (struct gdbarch *gdbarch,
}
int
-gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_target_read_fp != 0;
-}
-
-CORE_ADDR
-gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_target_read_fp == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_target_read_fp invalid");
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_target_read_fp called\n");
- return gdbarch->deprecated_target_read_fp ();
-}
-
-void
-set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch,
- gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp)
-{
- gdbarch->deprecated_target_read_fp = deprecated_target_read_fp;
-}
-
-int
gdbarch_read_sp_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
@@ -3158,23 +3132,6 @@ set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
}
int
-gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
- return gdbarch->deprecated_fp_regnum;
-}
-
-void
-set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
- int deprecated_fp_regnum)
-{
- gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
-}
-
-int
gdbarch_pc_regnum (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
@@ -3552,6 +3509,101 @@ set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch,
}
int
+gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->unwind_dummy_id != 0;
+}
+
+struct frame_id
+gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch->unwind_dummy_id == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_unwind_dummy_id invalid");
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n");
+ return gdbarch->unwind_dummy_id (gdbarch, info);
+}
+
+void
+set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch,
+ gdbarch_unwind_dummy_id_ftype unwind_dummy_id)
+{
+ gdbarch->unwind_dummy_id = unwind_dummy_id;
+}
+
+int
+gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->save_dummy_frame_tos != 0;
+}
+
+void
+gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch->save_dummy_frame_tos == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_save_dummy_frame_tos invalid");
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_save_dummy_frame_tos called\n");
+ gdbarch->save_dummy_frame_tos (sp);
+}
+
+void
+set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch,
+ gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos)
+{
+ gdbarch->save_dummy_frame_tos = save_dummy_frame_tos;
+}
+
+int
+gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
+ return gdbarch->deprecated_fp_regnum;
+}
+
+void
+set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
+ int deprecated_fp_regnum)
+{
+ gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
+}
+
+int
+gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->deprecated_target_read_fp != 0;
+}
+
+CORE_ADDR
+gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch->deprecated_target_read_fp == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_deprecated_target_read_fp invalid");
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_target_read_fp called\n");
+ return gdbarch->deprecated_target_read_fp ();
+}
+
+void
+set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch,
+ gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp)
+{
+ gdbarch->deprecated_target_read_fp = deprecated_target_read_fp;
+}
+
+int
gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
@@ -5200,58 +5252,6 @@ set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch,
}
int
-gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->save_dummy_frame_tos != 0;
-}
-
-void
-gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
-{
- gdb_assert (gdbarch != NULL);
- if (gdbarch->save_dummy_frame_tos == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_save_dummy_frame_tos invalid");
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_save_dummy_frame_tos called\n");
- gdbarch->save_dummy_frame_tos (sp);
-}
-
-void
-set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch,
- gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos)
-{
- gdbarch->save_dummy_frame_tos = save_dummy_frame_tos;
-}
-
-int
-gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->unwind_dummy_id != 0;
-}
-
-struct frame_id
-gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info)
-{
- gdb_assert (gdbarch != NULL);
- if (gdbarch->unwind_dummy_id == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_unwind_dummy_id invalid");
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n");
- return gdbarch->unwind_dummy_id (gdbarch, info);
-}
-
-void
-set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch,
- gdbarch_unwind_dummy_id_ftype unwind_dummy_id)
-{
- gdbarch->unwind_dummy_id = unwind_dummy_id;
-}
-
-int
gdbarch_parm_boundary (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 6c0eb3e..93c1970 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -333,44 +333,6 @@ extern void set_gdbarch_write_pc (struct gdbarch *gdbarch, gdbarch_write_pc_ftyp
#define TARGET_WRITE_PC(val, ptid) (gdbarch_write_pc (current_gdbarch, val, ptid))
#endif
-/* This is simply not needed. See value_of_builtin_frame_fp_reg and
- call_function_by_hand. */
-
-#if defined (DEPRECATED_TARGET_READ_FP)
-/* Legacy for systems yet to multi-arch DEPRECATED_TARGET_READ_FP */
-#if !defined (DEPRECATED_TARGET_READ_FP_P)
-#define DEPRECATED_TARGET_READ_FP_P() (1)
-#endif
-#endif
-
-/* Default predicate for non- multi-arch targets. */
-#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_TARGET_READ_FP_P)
-#define DEPRECATED_TARGET_READ_FP_P() (0)
-#endif
-
-extern int gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_TARGET_READ_FP_P)
-#error "Non multi-arch definition of DEPRECATED_TARGET_READ_FP"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_TARGET_READ_FP_P)
-#define DEPRECATED_TARGET_READ_FP_P() (gdbarch_deprecated_target_read_fp_p (current_gdbarch))
-#endif
-
-/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_TARGET_READ_FP)
-#define DEPRECATED_TARGET_READ_FP() (internal_error (__FILE__, __LINE__, "DEPRECATED_TARGET_READ_FP"), 0)
-#endif
-
-typedef CORE_ADDR (gdbarch_deprecated_target_read_fp_ftype) (void);
-extern CORE_ADDR gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch);
-extern void set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch, gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_TARGET_READ_FP)
-#error "Non multi-arch definition of DEPRECATED_TARGET_READ_FP"
-#endif
-#if !defined (DEPRECATED_TARGET_READ_FP)
-#define DEPRECATED_TARGET_READ_FP() (gdbarch_deprecated_target_read_fp (current_gdbarch))
-#endif
-
/* UNWIND_SP is a direct replacement for TARGET_READ_SP. */
#if defined (TARGET_READ_SP)
@@ -523,23 +485,6 @@ extern void set_gdbarch_sp_regnum (struct gdbarch *gdbarch, int sp_regnum);
#define SP_REGNUM (gdbarch_sp_regnum (current_gdbarch))
#endif
-/* This is simply not needed. See value_of_builtin_frame_fp_reg and
- call_function_by_hand. */
-
-/* Default (value) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FP_REGNUM)
-#define DEPRECATED_FP_REGNUM (-1)
-#endif
-
-extern int gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch);
-extern void set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch, int deprecated_fp_regnum);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FP_REGNUM)
-#error "Non multi-arch definition of DEPRECATED_FP_REGNUM"
-#endif
-#if !defined (DEPRECATED_FP_REGNUM)
-#define DEPRECATED_FP_REGNUM (gdbarch_deprecated_fp_regnum (current_gdbarch))
-#endif
-
/* Default (value) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (PC_REGNUM)
#define PC_REGNUM (-1)
@@ -764,12 +709,13 @@ extern void set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch, int
#define DEPRECATED_REGISTER_BYTES (gdbarch_deprecated_register_bytes (current_gdbarch))
#endif
-/* DEPRECATED_REGISTER_BYTE can be deleted. The value is computed from
- REGISTER_TYPE. NOTE: cagney/2002-05-02: This function with
- predicate has a valid (callable) initial value. As a consequence,
- even when the predicate is false, the corresponding function works.
- This simplifies the migration process - old code, calling
- DEPRECATED_REGISTER_BYTE, doesn't need to be modified. */
+/* If the value returned by DEPRECATED_REGISTER_BYTE agrees with the
+ register offsets computed using just REGISTER_TYPE, this can be
+ deleted. See: maint print registers. NOTE: cagney/2002-05-02: This
+ function with predicate has a valid (callable) initial value. As a
+ consequence, even when the predicate is false, the corresponding
+ function works. This simplifies the migration process - old code,
+ calling DEPRECATED_REGISTER_BYTE, doesn't need to be modified. */
#if defined (REGISTER_BYTE)
/* Legacy for systems yet to multi-arch REGISTER_BYTE */
@@ -806,8 +752,10 @@ extern void set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, gdbar
#define REGISTER_BYTE(reg_nr) (gdbarch_deprecated_register_byte (current_gdbarch, reg_nr))
#endif
-/* DEPRECATED_REGISTER_RAW_SIZE can be deleted. The value is computed
- from REGISTER_TYPE. */
+/* If all registers have identical raw and virtual sizes and those
+ sizes agree with the value computed from REGISTER_TYPE,
+ DEPRECATED_REGISTER_RAW_SIZE can be deleted. See: maint print
+ registers. */
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (REGISTER_RAW_SIZE)
@@ -824,8 +772,10 @@ extern void set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, g
#define REGISTER_RAW_SIZE(reg_nr) (gdbarch_deprecated_register_raw_size (current_gdbarch, reg_nr))
#endif
-/* DEPRECATED_REGISTER_VIRTUAL_SIZE can be deleted. The value is
- computed from REGISTER_TYPE. */
+/* If all registers have identical raw and virtual sizes and those
+ sizes agree with the value computed from REGISTER_TYPE,
+ DEPRECATED_REGISTER_VIRTUAL_SIZE can be deleted. See: maint print
+ registers. */
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_SIZE)
@@ -916,6 +866,107 @@ extern void set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gd
#define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE (gdbarch_deprecated_max_register_virtual_size (current_gdbarch))
#endif
+/* See gdbint.texinfo, and PUSH_DUMMY_CALL. */
+
+extern int gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch);
+
+typedef struct frame_id (gdbarch_unwind_dummy_id_ftype) (struct gdbarch *gdbarch, struct frame_info *info);
+extern struct frame_id gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info);
+extern void set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, gdbarch_unwind_dummy_id_ftype *unwind_dummy_id);
+
+/* Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete
+ SAVE_DUMMY_FRAME_TOS. */
+
+#if defined (SAVE_DUMMY_FRAME_TOS)
+/* Legacy for systems yet to multi-arch SAVE_DUMMY_FRAME_TOS */
+#if !defined (SAVE_DUMMY_FRAME_TOS_P)
+#define SAVE_DUMMY_FRAME_TOS_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (SAVE_DUMMY_FRAME_TOS_P)
+#define SAVE_DUMMY_FRAME_TOS_P() (0)
+#endif
+
+extern int gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SAVE_DUMMY_FRAME_TOS_P)
+#error "Non multi-arch definition of SAVE_DUMMY_FRAME_TOS"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SAVE_DUMMY_FRAME_TOS_P)
+#define SAVE_DUMMY_FRAME_TOS_P() (gdbarch_save_dummy_frame_tos_p (current_gdbarch))
+#endif
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (SAVE_DUMMY_FRAME_TOS)
+#define SAVE_DUMMY_FRAME_TOS(sp) (internal_error (__FILE__, __LINE__, "SAVE_DUMMY_FRAME_TOS"), 0)
+#endif
+
+typedef void (gdbarch_save_dummy_frame_tos_ftype) (CORE_ADDR sp);
+extern void gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp);
+extern void set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SAVE_DUMMY_FRAME_TOS)
+#error "Non multi-arch definition of SAVE_DUMMY_FRAME_TOS"
+#endif
+#if !defined (SAVE_DUMMY_FRAME_TOS)
+#define SAVE_DUMMY_FRAME_TOS(sp) (gdbarch_save_dummy_frame_tos (current_gdbarch, sp))
+#endif
+
+/* Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete
+ DEPRECATED_FP_REGNUM. */
+
+/* Default (value) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FP_REGNUM)
+#define DEPRECATED_FP_REGNUM (-1)
+#endif
+
+extern int gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch);
+extern void set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch, int deprecated_fp_regnum);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FP_REGNUM)
+#error "Non multi-arch definition of DEPRECATED_FP_REGNUM"
+#endif
+#if !defined (DEPRECATED_FP_REGNUM)
+#define DEPRECATED_FP_REGNUM (gdbarch_deprecated_fp_regnum (current_gdbarch))
+#endif
+
+/* Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete
+ DEPRECATED_TARGET_READ_FP. */
+
+#if defined (DEPRECATED_TARGET_READ_FP)
+/* Legacy for systems yet to multi-arch DEPRECATED_TARGET_READ_FP */
+#if !defined (DEPRECATED_TARGET_READ_FP_P)
+#define DEPRECATED_TARGET_READ_FP_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_TARGET_READ_FP_P)
+#define DEPRECATED_TARGET_READ_FP_P() (0)
+#endif
+
+extern int gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_TARGET_READ_FP_P)
+#error "Non multi-arch definition of DEPRECATED_TARGET_READ_FP"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_TARGET_READ_FP_P)
+#define DEPRECATED_TARGET_READ_FP_P() (gdbarch_deprecated_target_read_fp_p (current_gdbarch))
+#endif
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_TARGET_READ_FP)
+#define DEPRECATED_TARGET_READ_FP() (internal_error (__FILE__, __LINE__, "DEPRECATED_TARGET_READ_FP"), 0)
+#endif
+
+typedef CORE_ADDR (gdbarch_deprecated_target_read_fp_ftype) (void);
+extern CORE_ADDR gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch);
+extern void set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch, gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_TARGET_READ_FP)
+#error "Non multi-arch definition of DEPRECATED_TARGET_READ_FP"
+#endif
+#if !defined (DEPRECATED_TARGET_READ_FP)
+#define DEPRECATED_TARGET_READ_FP() (gdbarch_deprecated_target_read_fp (current_gdbarch))
+#endif
+
#if defined (DEPRECATED_DO_REGISTERS_INFO)
/* Legacy for systems yet to multi-arch DEPRECATED_DO_REGISTERS_INFO */
#if !defined (DEPRECATED_DO_REGISTERS_INFO_P)
@@ -2472,50 +2523,6 @@ extern void set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, gdbarch_re
#define REG_STRUCT_HAS_ADDR(gcc_p, type) (gdbarch_reg_struct_has_addr (current_gdbarch, gcc_p, type))
#endif
-/* FIXME: kettenis/2003-03-08: This should be replaced by a function
- parametrized with (at least) the regcache. */
-
-#if defined (SAVE_DUMMY_FRAME_TOS)
-/* Legacy for systems yet to multi-arch SAVE_DUMMY_FRAME_TOS */
-#if !defined (SAVE_DUMMY_FRAME_TOS_P)
-#define SAVE_DUMMY_FRAME_TOS_P() (1)
-#endif
-#endif
-
-/* Default predicate for non- multi-arch targets. */
-#if (!GDB_MULTI_ARCH) && !defined (SAVE_DUMMY_FRAME_TOS_P)
-#define SAVE_DUMMY_FRAME_TOS_P() (0)
-#endif
-
-extern int gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SAVE_DUMMY_FRAME_TOS_P)
-#error "Non multi-arch definition of SAVE_DUMMY_FRAME_TOS"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SAVE_DUMMY_FRAME_TOS_P)
-#define SAVE_DUMMY_FRAME_TOS_P() (gdbarch_save_dummy_frame_tos_p (current_gdbarch))
-#endif
-
-/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (SAVE_DUMMY_FRAME_TOS)
-#define SAVE_DUMMY_FRAME_TOS(sp) (internal_error (__FILE__, __LINE__, "SAVE_DUMMY_FRAME_TOS"), 0)
-#endif
-
-typedef void (gdbarch_save_dummy_frame_tos_ftype) (CORE_ADDR sp);
-extern void gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp);
-extern void set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SAVE_DUMMY_FRAME_TOS)
-#error "Non multi-arch definition of SAVE_DUMMY_FRAME_TOS"
-#endif
-#if !defined (SAVE_DUMMY_FRAME_TOS)
-#define SAVE_DUMMY_FRAME_TOS(sp) (gdbarch_save_dummy_frame_tos (current_gdbarch, sp))
-#endif
-
-extern int gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch);
-
-typedef struct frame_id (gdbarch_unwind_dummy_id_ftype) (struct gdbarch *gdbarch, struct frame_info *info);
-extern struct frame_id gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info);
-extern void set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, gdbarch_unwind_dummy_id_ftype *unwind_dummy_id);
-
extern int gdbarch_parm_boundary (struct gdbarch *gdbarch);
extern void set_gdbarch_parm_boundary (struct gdbarch *gdbarch, int parm_boundary);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PARM_BOUNDARY)
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 9911ec8..ba279be 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -428,9 +428,6 @@ v:2:TARGET_CHAR_SIGNED:int:char_signed::::1:-1:1::::
#
F:2:TARGET_READ_PC:CORE_ADDR:read_pc:ptid_t ptid:ptid
f:2:TARGET_WRITE_PC:void:write_pc:CORE_ADDR val, ptid_t ptid:val, ptid::0:generic_target_write_pc::0
-# This is simply not needed. See value_of_builtin_frame_fp_reg and
-# call_function_by_hand.
-F::DEPRECATED_TARGET_READ_FP:CORE_ADDR:deprecated_target_read_fp:void
# UNWIND_SP is a direct replacement for TARGET_READ_SP.
F:2:TARGET_READ_SP:CORE_ADDR:read_sp:void
# The dummy call frame SP should be set by push_dummy_call.
@@ -455,9 +452,6 @@ v:2:NUM_PSEUDO_REGS:int:num_pseudo_regs::::0:0::0:::
# all (-1).
# SP_REGNUM will hopefully be replaced by UNWIND_SP.
v:2:SP_REGNUM:int:sp_regnum::::-1:-1::0
-# This is simply not needed. See value_of_builtin_frame_fp_reg and
-# call_function_by_hand.
-v:2:DEPRECATED_FP_REGNUM:int:deprecated_fp_regnum::::-1:-1::0
v:2:PC_REGNUM:int:pc_regnum::::-1:-1::0
v:2:PS_REGNUM:int:ps_regnum::::-1:-1::0
v:2:FP0_REGNUM:int:fp0_regnum::::0:-1::0
@@ -484,18 +478,23 @@ F:2:REGISTER_VIRTUAL_TYPE:struct type *:deprecated_register_virtual_type:int reg
# DEPRECATED_REGISTER_BYTES can be deleted. The value is computed
# from REGISTER_TYPE.
v::DEPRECATED_REGISTER_BYTES:int:deprecated_register_bytes
-# DEPRECATED_REGISTER_BYTE can be deleted. The value is computed from
-# REGISTER_TYPE. NOTE: cagney/2002-05-02: This function with
-# predicate has a valid (callable) initial value. As a consequence,
-# even when the predicate is false, the corresponding function works.
-# This simplifies the migration process - old code, calling
-# DEPRECATED_REGISTER_BYTE, doesn't need to be modified.
+# If the value returned by DEPRECATED_REGISTER_BYTE agrees with the
+# register offsets computed using just REGISTER_TYPE, this can be
+# deleted. See: maint print registers. NOTE: cagney/2002-05-02: This
+# function with predicate has a valid (callable) initial value. As a
+# consequence, even when the predicate is false, the corresponding
+# function works. This simplifies the migration process - old code,
+# calling DEPRECATED_REGISTER_BYTE, doesn't need to be modified.
F::REGISTER_BYTE:int:deprecated_register_byte:int reg_nr:reg_nr::generic_register_byte:generic_register_byte
-# DEPRECATED_REGISTER_RAW_SIZE can be deleted. The value is computed
-# from REGISTER_TYPE.
+# If all registers have identical raw and virtual sizes and those
+# sizes agree with the value computed from REGISTER_TYPE,
+# DEPRECATED_REGISTER_RAW_SIZE can be deleted. See: maint print
+# registers.
f:2:REGISTER_RAW_SIZE:int:deprecated_register_raw_size:int reg_nr:reg_nr::generic_register_size:generic_register_size::0
-# DEPRECATED_REGISTER_VIRTUAL_SIZE can be deleted. The value is
-# computed from REGISTER_TYPE.
+# If all registers have identical raw and virtual sizes and those
+# sizes agree with the value computed from REGISTER_TYPE,
+# DEPRECATED_REGISTER_VIRTUAL_SIZE can be deleted. See: maint print
+# registers.
f:2:REGISTER_VIRTUAL_SIZE:int:deprecated_register_virtual_size:int reg_nr:reg_nr::generic_register_size:generic_register_size::0
# DEPRECATED_MAX_REGISTER_RAW_SIZE can be deleted. It has been
# replaced by the constant MAX_REGISTER_SIZE.
@@ -504,6 +503,18 @@ V:2:DEPRECATED_MAX_REGISTER_RAW_SIZE:int:deprecated_max_register_raw_size
# replaced by the constant MAX_REGISTER_SIZE.
V:2:DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE:int:deprecated_max_register_virtual_size
+# See gdbint.texinfo, and PUSH_DUMMY_CALL.
+M::UNWIND_DUMMY_ID:struct frame_id:unwind_dummy_id:struct frame_info *info:info::0:0
+# Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete
+# SAVE_DUMMY_FRAME_TOS.
+F:2:SAVE_DUMMY_FRAME_TOS:void:save_dummy_frame_tos:CORE_ADDR sp:sp::0:0
+# Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete
+# DEPRECATED_FP_REGNUM.
+v:2:DEPRECATED_FP_REGNUM:int:deprecated_fp_regnum::::-1:-1::0
+# Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete
+# DEPRECATED_TARGET_READ_FP.
+F::DEPRECATED_TARGET_READ_FP:CORE_ADDR:deprecated_target_read_fp:void
+
F:2:DEPRECATED_DO_REGISTERS_INFO:void:deprecated_do_registers_info:int reg_nr, int fpregs:reg_nr, fpregs
m:2:PRINT_REGISTERS_INFO:void:print_registers_info:struct ui_file *file, struct frame_info *frame, int regnum, int all:file, frame, regnum, all:::default_print_registers_info::0
M:2:PRINT_FLOAT_INFO:void:print_float_info:struct ui_file *file, struct frame_info *frame, const char *args:file, frame, args
@@ -631,10 +642,6 @@ M:::CORE_ADDR:frame_align:CORE_ADDR address:address
# NOTE: cagney/2003-03-24: This is better handled by PUSH_ARGUMENTS.
v:2:DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED:int:deprecated_extra_stack_alignment_needed::::0:0::0:::
F:2:REG_STRUCT_HAS_ADDR:int:reg_struct_has_addr:int gcc_p, struct type *type:gcc_p, type::0:0
-# FIXME: kettenis/2003-03-08: This should be replaced by a function
-# parametrized with (at least) the regcache.
-F:2:SAVE_DUMMY_FRAME_TOS:void:save_dummy_frame_tos:CORE_ADDR sp:sp::0:0
-M::UNWIND_DUMMY_ID:struct frame_id:unwind_dummy_id:struct frame_info *info:info::0:0
v:2:PARM_BOUNDARY:int:parm_boundary
#
v:2:TARGET_FLOAT_FORMAT:const struct floatformat *:float_format::::::default_float_format (gdbarch)::%s:(TARGET_FLOAT_FORMAT)->name