This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch rfc] Deprecate GET_SAVED_REGISTER
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Wed, 12 Mar 2003 18:38:47 -0500
- Subject: [patch rfc] Deprecate GET_SAVED_REGISTER
Hello,
This marks the GET_SAVED_REGISTER method as clearly deprecated.
Somewhat ammusing to see calls such as:
set_gdbarch_deprecated_get_saved_register (gdbarch,
deprecated_generic_get_saved_register);
I'll look to commit this in a few days,
Andrew
2003-03-12 Andrew Cagney <cagney at redhat dot 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.
Index: cris-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/cris-tdep.c,v
retrieving revision 1.51
diff -u -r1.51 cris-tdep.c
--- cris-tdep.c 12 Mar 2003 16:50:43 -0000 1.51
+++ cris-tdep.c 12 Mar 2003 23:33:56 -0000
@@ -4279,7 +4279,7 @@
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);
Index: frame.c
===================================================================
RCS file: /cvs/src/src/gdb/frame.c,v
retrieving revision 1.79
diff -u -r1.79 frame.c
--- frame.c 12 Mar 2003 22:39:16 -0000 1.79
+++ frame.c 12 Mar 2003 23:33:56 -0000
@@ -268,9 +268,10 @@
/* 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)
{
@@ -406,9 +407,10 @@
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,
Index: frame.h
===================================================================
RCS file: /cvs/src/src/gdb/frame.h,v
retrieving revision 1.71
diff -u -r1.71 frame.h
--- frame.h 5 Mar 2003 18:51:17 -0000 1.71
+++ frame.h 12 Mar 2003 23:33:56 -0000
@@ -554,10 +554,11 @@
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 *);
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.204
diff -u -r1.204 gdbarch.sh
--- gdbarch.sh 12 Mar 2003 16:50:43 -0000 1.204
+++ gdbarch.sh 12 Mar 2003 23:33:57 -0000
@@ -541,7 +541,7 @@
#
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
Index: ia64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ia64-tdep.c,v
retrieving revision 1.53
diff -u -r1.53 ia64-tdep.c
--- ia64-tdep.c 12 Mar 2003 16:50:44 -0000 1.53
+++ ia64-tdep.c 12 Mar 2003 23:33:57 -0000
@@ -93,7 +93,6 @@
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;
@@ -2199,7 +2198,7 @@
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);
Index: m68hc11-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/m68hc11-tdep.c,v
retrieving revision 1.50
diff -u -r1.50 m68hc11-tdep.c
--- m68hc11-tdep.c 12 Mar 2003 16:50:44 -0000 1.50
+++ m68hc11-tdep.c 12 Mar 2003 23:33:57 -0000
@@ -1390,7 +1390,7 @@
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);
@@ -1410,7 +1410,7 @@
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);
Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.170
diff -u -r1.170 mips-tdep.c
--- mips-tdep.c 12 Mar 2003 16:50:45 -0000 1.170
+++ mips-tdep.c 12 Mar 2003 23:33:57 -0000
@@ -6031,7 +6031,7 @@
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);
Index: sh-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sh-tdep.c,v
retrieving revision 1.101
diff -u -r1.101 sh-tdep.c
--- sh-tdep.c 12 Mar 2003 16:50:45 -0000 1.101
+++ sh-tdep.c 12 Mar 2003 23:33:57 -0000
@@ -4372,7 +4372,7 @@
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);
@@ -4615,7 +4615,7 @@
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);*/
Index: sparc-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sparc-tdep.c,v
retrieving revision 1.70
diff -u -r1.70 sparc-tdep.c
--- sparc-tdep.c 12 Mar 2003 16:50:45 -0000 1.70
+++ sparc-tdep.c 12 Mar 2003 23:33:57 -0000
@@ -3150,7 +3150,7 @@
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);
Index: x86-64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/x86-64-tdep.c,v
retrieving revision 1.54
diff -u -r1.54 x86-64-tdep.c
--- x86-64-tdep.c 12 Mar 2003 16:50:45 -0000 1.54
+++ x86-64-tdep.c 12 Mar 2003 23:33:59 -0000
@@ -1006,7 +1006,7 @@
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);
Index: xstormy16-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/xstormy16-tdep.c,v
retrieving revision 1.28
diff -u -r1.28 xstormy16-tdep.c
--- xstormy16-tdep.c 12 Mar 2003 16:50:46 -0000 1.28
+++ xstormy16-tdep.c 12 Mar 2003 23:34:00 -0000
@@ -1058,7 +1058,7 @@
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);
Index: config/sparc/tm-sparc.h
===================================================================
RCS file: /cvs/src/src/gdb/config/sparc/tm-sparc.h,v
retrieving revision 1.36
diff -u -r1.36 tm-sparc.h
--- config/sparc/tm-sparc.h 12 Mar 2003 16:50:47 -0000 1.36
+++ config/sparc/tm-sparc.h 12 Mar 2003 23:34:00 -0000
@@ -453,8 +453,8 @@
/* 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,
@@ -462,7 +462,7 @@
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)