+2003-03-14 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (DEPRECATED_GET_SAVED_REGISTER): Replace
+ GET_SAVED_REGISTER.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * frame.h: Update comments.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Update.
+ * x86-64-tdep.c (x86_64_init_abi): Update.
+ * sparc-tdep.c (sparc_gdbarch_init): Update.
+ * sh-tdep.c (sh_gdbarch_init): Update.
+ * mips-tdep.c (mips_gdbarch_init): Update.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
+ * cris-tdep.c (cris_gdbarch_init): Update.
+ * ia64-tdep.c (ia64_gdbarch_init): Update.
+ * frame.c (frame_register): Update.
+ (get_saved_register): Update.
+ * config/sparc/tm-sparc.h (DEPRECATED_GET_SAVED_REGISTER): Update.
+
2003-03-13 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (DEPRECATED_POP_FRAME): Replace POP_FRAME.
/* time of the register saves. */ \
int sp_offset;
-/* We need to override GET_SAVED_REGISTER so that we can deal with the
- way outs change into ins in different frames. */
+/* We need to override DEPRECATED_GET_SAVED_REGISTER so that we can
+ deal with the way outs change into ins in different frames. */
void sparc_get_saved_register (char *raw_buffer,
int *optimized,
struct frame_info *frame,
int regnum, enum lval_type *lvalp);
-#define GET_SAVED_REGISTER(RAW_BUFFER, OPTIMIZED, ADDRP, FRAME, REGNUM, LVAL) \
+#define DEPRECATED_GET_SAVED_REGISTER(RAW_BUFFER, OPTIMIZED, ADDRP, FRAME, REGNUM, LVAL) \
sparc_get_saved_register (RAW_BUFFER, OPTIMIZED, ADDRP, \
FRAME, REGNUM, LVAL)
set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
- set_gdbarch_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
+ set_gdbarch_deprecated_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
/* No register requires conversion from raw format to virtual format. */
set_gdbarch_register_convertible (gdbarch, generic_register_convertible_not);
/* Ulgh! Old code that, for lval_register, sets ADDRP to the offset
of the register in the register cache. It should instead return
the REGNUM corresponding to that register. Translate the . */
- if (GET_SAVED_REGISTER_P ())
+ if (DEPRECATED_GET_SAVED_REGISTER_P ())
{
- GET_SAVED_REGISTER (bufferp, optimizedp, addrp, frame, regnum, lvalp);
+ DEPRECATED_GET_SAVED_REGISTER (bufferp, optimizedp, addrp, frame,
+ regnum, lvalp);
/* Compute the REALNUM if the caller wants it. */
if (*lvalp == lval_register)
{
int regnum,
enum lval_type *lval)
{
- if (GET_SAVED_REGISTER_P ())
+ if (DEPRECATED_GET_SAVED_REGISTER_P ())
{
- GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval);
+ DEPRECATED_GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame,
+ regnum, lval);
return;
}
generic_unwind_get_saved_register (raw_buffer, optimized, addrp, frame,
enum lval_type *lvalp);
/* The function generic_get_saved_register() has been made obsolete.
- GET_SAVED_REGISTER now defaults to the recursive equivalent -
- generic_unwind_get_saved_register() - so there is no need to even
- set GET_SAVED_REGISTER. Architectures that need to override the
- register unwind mechanism should modify frame->unwind(). */
+ DEPRECATED_GET_SAVED_REGISTER now defaults to the recursive
+ equivalent - generic_unwind_get_saved_register() - so there is no
+ need to even set DEPRECATED_GET_SAVED_REGISTER. Architectures that
+ need to override the register unwind mechanism should modify
+ frame->unwind(). */
extern void deprecated_generic_get_saved_register (char *, int *, CORE_ADDR *,
struct frame_info *, int,
enum lval_type *);
gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc;
int believe_pcc_promotion;
int believe_pcc_promotion_type;
- gdbarch_get_saved_register_ftype *get_saved_register;
+ 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;
fprintf_unfiltered (log, "\n\tfix_call_dummy");
/* Skip verify of deprecated_init_frame_pc_first, has predicate */
/* Skip verify of deprecated_init_frame_pc, has predicate */
- /* Skip verify of get_saved_register, 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 */
(long) current_gdbarch->deprecated_frame_saved_pc
/*DEPRECATED_FRAME_SAVED_PC ()*/);
#endif
+#ifdef DEPRECATED_GET_SAVED_REGISTER_P
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_GET_SAVED_REGISTER_P()",
+ XSTRING (DEPRECATED_GET_SAVED_REGISTER_P ()));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER_P() = %d\n",
+ DEPRECATED_GET_SAVED_REGISTER_P ());
+#endif
+#ifdef DEPRECATED_GET_SAVED_REGISTER
+#if GDB_MULTI_ARCH
+ /* Macro might contain `[{}]' when not multi-arch */
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
+ XSTRING (DEPRECATED_GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
+#endif
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER = <0x%08lx>\n",
+ (long) current_gdbarch->deprecated_get_saved_register
+ /*DEPRECATED_GET_SAVED_REGISTER ()*/);
+#endif
#ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
(long) current_gdbarch->get_longjmp_target
/*GET_LONGJMP_TARGET ()*/);
#endif
-#ifdef GET_SAVED_REGISTER_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "GET_SAVED_REGISTER_P()",
- XSTRING (GET_SAVED_REGISTER_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: GET_SAVED_REGISTER_P() = %d\n",
- GET_SAVED_REGISTER_P ());
-#endif
-#ifdef GET_SAVED_REGISTER
-#if GDB_MULTI_ARCH
- /* Macro might contain `[{}]' when not multi-arch */
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
- XSTRING (GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
-#endif
- if (GDB_MULTI_ARCH)
- fprintf_unfiltered (file,
- "gdbarch_dump: GET_SAVED_REGISTER = <0x%08lx>\n",
- (long) current_gdbarch->get_saved_register
- /*GET_SAVED_REGISTER ()*/);
-#endif
#ifdef HAVE_NONSTEPPABLE_WATCHPOINT
fprintf_unfiltered (file,
"gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
}
int
-gdbarch_get_saved_register_p (struct gdbarch *gdbarch)
+gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->get_saved_register != 0;
+ return gdbarch->deprecated_get_saved_register != 0;
}
void
-gdbarch_get_saved_register (struct gdbarch *gdbarch, char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval)
+gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch, char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->get_saved_register == 0)
+ if (gdbarch->deprecated_get_saved_register == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_get_saved_register invalid");
+ "gdbarch: gdbarch_deprecated_get_saved_register invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_get_saved_register called\n");
- gdbarch->get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_get_saved_register called\n");
+ gdbarch->deprecated_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
}
void
-set_gdbarch_get_saved_register (struct gdbarch *gdbarch,
- gdbarch_get_saved_register_ftype get_saved_register)
+set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch,
+ gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register)
{
- gdbarch->get_saved_register = get_saved_register;
+ gdbarch->deprecated_get_saved_register = deprecated_get_saved_register;
}
int
#define BELIEVE_PCC_PROMOTION_TYPE (gdbarch_believe_pcc_promotion_type (current_gdbarch))
#endif
-#if defined (GET_SAVED_REGISTER)
-/* Legacy for systems yet to multi-arch GET_SAVED_REGISTER */
-#if !defined (GET_SAVED_REGISTER_P)
-#define GET_SAVED_REGISTER_P() (1)
+#if defined (DEPRECATED_GET_SAVED_REGISTER)
+/* Legacy for systems yet to multi-arch DEPRECATED_GET_SAVED_REGISTER */
+#if !defined (DEPRECATED_GET_SAVED_REGISTER_P)
+#define DEPRECATED_GET_SAVED_REGISTER_P() (1)
#endif
#endif
/* Default predicate for non- multi-arch targets. */
-#if (!GDB_MULTI_ARCH) && !defined (GET_SAVED_REGISTER_P)
-#define GET_SAVED_REGISTER_P() (0)
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_GET_SAVED_REGISTER_P)
+#define DEPRECATED_GET_SAVED_REGISTER_P() (0)
#endif
-extern int gdbarch_get_saved_register_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_SAVED_REGISTER_P)
-#error "Non multi-arch definition of GET_SAVED_REGISTER"
+extern int gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_GET_SAVED_REGISTER_P)
+#error "Non multi-arch definition of DEPRECATED_GET_SAVED_REGISTER"
#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (GET_SAVED_REGISTER_P)
-#define GET_SAVED_REGISTER_P() (gdbarch_get_saved_register_p (current_gdbarch))
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_GET_SAVED_REGISTER_P)
+#define DEPRECATED_GET_SAVED_REGISTER_P() (gdbarch_deprecated_get_saved_register_p (current_gdbarch))
#endif
/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (GET_SAVED_REGISTER)
-#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) (internal_error (__FILE__, __LINE__, "GET_SAVED_REGISTER"), 0)
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_GET_SAVED_REGISTER)
+#define DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) (internal_error (__FILE__, __LINE__, "DEPRECATED_GET_SAVED_REGISTER"), 0)
#endif
-typedef void (gdbarch_get_saved_register_ftype) (char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval);
-extern void gdbarch_get_saved_register (struct gdbarch *gdbarch, char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval);
-extern void set_gdbarch_get_saved_register (struct gdbarch *gdbarch, gdbarch_get_saved_register_ftype *get_saved_register);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_SAVED_REGISTER)
-#error "Non multi-arch definition of GET_SAVED_REGISTER"
+typedef void (gdbarch_deprecated_get_saved_register_ftype) (char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval);
+extern void gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch, char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval);
+extern void set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch, gdbarch_deprecated_get_saved_register_ftype *deprecated_get_saved_register);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_GET_SAVED_REGISTER)
+#error "Non multi-arch definition of DEPRECATED_GET_SAVED_REGISTER"
#endif
#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (GET_SAVED_REGISTER)
-#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) (gdbarch_get_saved_register (current_gdbarch, raw_buffer, optimized, addrp, frame, regnum, lval))
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_GET_SAVED_REGISTER)
+#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
#endif
#
v:2:BELIEVE_PCC_PROMOTION:int:believe_pcc_promotion:::::::
v::BELIEVE_PCC_PROMOTION_TYPE:int:believe_pcc_promotion_type:::::::
-F:2:GET_SAVED_REGISTER:void: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: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
static gdbarch_breakpoint_from_pc_ftype ia64_breakpoint_from_pc;
static gdbarch_frame_chain_ftype ia64_frame_chain;
static gdbarch_skip_prologue_ftype ia64_skip_prologue;
-static gdbarch_get_saved_register_ftype ia64_get_saved_register;
static gdbarch_deprecated_extract_return_value_ftype ia64_extract_return_value;
static gdbarch_deprecated_extract_struct_value_address_ftype ia64_extract_struct_value_address;
static gdbarch_use_struct_convention_ftype ia64_use_struct_convention;
set_gdbarch_deprecated_frame_saved_pc (gdbarch, ia64_frame_saved_pc);
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, ia64_frame_init_saved_regs);
- set_gdbarch_get_saved_register (gdbarch, ia64_get_saved_register);
+ 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);
sizeof (m68hc11_call_dummy_words));
set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
- set_gdbarch_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
+ set_gdbarch_deprecated_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
set_gdbarch_deprecated_extract_return_value (gdbarch, m68hc11_extract_return_value);
set_gdbarch_push_arguments (gdbarch, m68hc11_push_arguments);
set_gdbarch_saved_pc_after_call (gdbarch, m68hc11_saved_pc_after_call);
set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
- set_gdbarch_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
+ set_gdbarch_deprecated_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
set_gdbarch_store_struct_return (gdbarch, m68hc11_store_struct_return);
set_gdbarch_deprecated_store_return_value (gdbarch, m68hc11_store_return_value);
set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
set_gdbarch_frame_args_skip (gdbarch, 0);
- set_gdbarch_get_saved_register (gdbarch, mips_get_saved_register);
+ set_gdbarch_deprecated_get_saved_register (gdbarch, mips_get_saved_register);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
set_gdbarch_breakpoint_from_pc (gdbarch, mips_breakpoint_from_pc);
set_gdbarch_deprecated_do_registers_info (gdbarch, sh_do_registers_info);
set_gdbarch_breakpoint_from_pc (gdbarch, sh_breakpoint_from_pc);
set_gdbarch_frame_chain (gdbarch, sh_frame_chain);
- set_gdbarch_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
+ set_gdbarch_deprecated_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
set_gdbarch_deprecated_init_extra_frame_info (gdbarch, sh_init_extra_frame_info);
set_gdbarch_deprecated_extract_return_value (gdbarch, sh_extract_return_value);
set_gdbarch_push_arguments (gdbarch, sh_push_arguments);
set_gdbarch_breakpoint_from_pc (gdbarch, sh_sh64_breakpoint_from_pc);
set_gdbarch_deprecated_init_extra_frame_info (gdbarch, sh64_init_extra_frame_info);
set_gdbarch_frame_chain (gdbarch, sh64_frame_chain);
- set_gdbarch_get_saved_register (gdbarch, sh64_get_saved_register);
+ set_gdbarch_deprecated_get_saved_register (gdbarch, sh64_get_saved_register);
set_gdbarch_deprecated_extract_return_value (gdbarch, sh64_extract_return_value);
set_gdbarch_push_arguments (gdbarch, sh64_push_arguments);
/*set_gdbarch_store_struct_return (gdbarch, sh64_store_struct_return);*/
set_gdbarch_deprecated_frame_saved_pc (gdbarch, sparc_frame_saved_pc);
set_gdbarch_frameless_function_invocation (gdbarch,
frameless_look_for_prologue);
- set_gdbarch_get_saved_register (gdbarch, sparc_get_saved_register);
+ set_gdbarch_deprecated_get_saved_register (gdbarch, sparc_get_saved_register);
set_gdbarch_deprecated_init_extra_frame_info (gdbarch, sparc_init_extra_frame_info);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
set_gdbarch_int_bit (gdbarch, 4 * TARGET_CHAR_BIT);
x86_64_register_convert_to_raw);
/* Getting saved registers is handled by unwind information. */
- set_gdbarch_get_saved_register (gdbarch, cfi_get_saved_register);
+ set_gdbarch_deprecated_get_saved_register (gdbarch, cfi_get_saved_register);
/* FIXME: kettenis/20021026: Should we set parm_boundary to 64 here? */
set_gdbarch_read_fp (gdbarch, cfi_read_fp);
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch,
xstormy16_frame_init_saved_regs);
set_gdbarch_frame_chain (gdbarch, xstormy16_frame_chain);
- set_gdbarch_get_saved_register (gdbarch, xstormy16_get_saved_register);
+ set_gdbarch_deprecated_get_saved_register (gdbarch, xstormy16_get_saved_register);
set_gdbarch_saved_pc_after_call (gdbarch, xstormy16_saved_pc_after_call);
set_gdbarch_deprecated_frame_saved_pc (gdbarch, xstormy16_frame_saved_pc);
set_gdbarch_skip_prologue (gdbarch, xstormy16_skip_prologue);