From: Andrew Cagney Date: Fri, 14 Jun 2002 22:55:51 +0000 (+0000) Subject: + * gdbarch.sh (DEPRECATED_EXTRACT_RETURN_VALUE): Rename X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=26e9b323dab70137f9059a9626f5b67a24ea430f;p=binutils-gdb.git + * gdbarch.sh (DEPRECATED_EXTRACT_RETURN_VALUE): Rename + EXTRACT_RETURN_VALUE. + (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS): Rename + EXTRACT_STRUCT_VALUE_ADDRESS. + * gdbarch.h, gdbarch.c: Regenerate. + + * values.c (value_being_returned): Handle + DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS. + (EXTRACT_RETURN_VALUE): Define as DEPRECATED_EXTRACT_RETURN_VALUE. + + * arm-linux-tdep.c (arm_linux_init_abi): Update. + * arm-tdep.c (arm_gdbarch_init): Update. + * avr-tdep.c (avr_gdbarch_init): Update. + * cris-tdep.c (cris_gdbarch_init): Update. + * d10v-tdep.c (d10v_gdbarch_init): Update. + * ia64-tdep.c (ia64_gdbarch_init): Update. + * m68hc11-tdep.c (m68hc11_gdbarch_init): Update. + * rs6000-tdep.c (rs6000_gdbarch_init): Update. + * s390-tdep.c (s390_gdbarch_init): Update. + * sh-tdep.c (sh_gdbarch_init): Update. + * s390-tdep.c (s390_gdbarch_init): Update. + * sparc-tdep.c (sparc_gdbarch_init): Update. + * ns32k-tdep.c (ns32k_gdbarch_init): Update. + * v850-tdep.c (v850_gdbarch_init): Update. + * vax-tdep.c (vax_gdbarch_init): Update. + * x86-64-tdep.c (x86_64_gdbarch_init): Update. + * xstormy16-tdep.c (xstormy16_gdbarch_init): Update. + + * config/arc/tm-arc.h: Update. + * config/d30v/tm-d30v.h: Update. + * config/fr30/tm-fr30.h: Update. + * config/h8300/tm-h8300.h: Update. * config/h8500/tm-h8500.h: Update. * config/i386/tm-i386.h: Update. * config/i386/tm-ptx.h: Update. * config/i386/tm-symmetry.h: Update. * config/i960/tm-i960.h: Update. * config/m32r/tm-m32r.h: Update. * config/m68k/tm-delta68.h: Update. * config/m68k/tm-linux.h: Update. * config/m68k/tm-m68k.h: Update. * config/m88k/tm-m88k.h: Update. * config/mcore/tm-mcore.h: Update. * config/mips/tm-mips.h: Update. * config/mn10200/tm-mn10200.h: Update. * config/pa/tm-hppa.h: Update. * config/pa/tm-hppa64.h: Update. * config/sparc/tm-sp64.h: Update. * config/sparc/tm-sparc.h: Update. * config/sparc/tm-sparclet.h: Update. * config/z8k/tm-z8k.h: Update. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fdce4ebabd6..6bbfc9da72b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,57 @@ +2002-06-14 Andrew Cagney + + * gdbarch.sh (DEPRECATED_EXTRACT_RETURN_VALUE): Rename + EXTRACT_RETURN_VALUE. + (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS): Rename + EXTRACT_STRUCT_VALUE_ADDRESS. + * gdbarch.h, gdbarch.c: Regenerate. + + * values.c (value_being_returned): Handle + DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS. + (EXTRACT_RETURN_VALUE): Define as DEPRECATED_EXTRACT_RETURN_VALUE. + + * arm-linux-tdep.c (arm_linux_init_abi): Update. + * arm-tdep.c (arm_gdbarch_init): Update. + * avr-tdep.c (avr_gdbarch_init): Update. + * cris-tdep.c (cris_gdbarch_init): Update. + * d10v-tdep.c (d10v_gdbarch_init): Update. + * ia64-tdep.c (ia64_gdbarch_init): Update. + * m68hc11-tdep.c (m68hc11_gdbarch_init): Update. + * rs6000-tdep.c (rs6000_gdbarch_init): Update. + * s390-tdep.c (s390_gdbarch_init): Update. + * sh-tdep.c (sh_gdbarch_init): Update. + * s390-tdep.c (s390_gdbarch_init): Update. + * sparc-tdep.c (sparc_gdbarch_init): Update. + * ns32k-tdep.c (ns32k_gdbarch_init): Update. + * v850-tdep.c (v850_gdbarch_init): Update. + * vax-tdep.c (vax_gdbarch_init): Update. + * x86-64-tdep.c (x86_64_gdbarch_init): Update. + * xstormy16-tdep.c (xstormy16_gdbarch_init): Update. + + * config/arc/tm-arc.h: Update. + * config/d30v/tm-d30v.h: Update. + * config/fr30/tm-fr30.h: Update. + * config/h8300/tm-h8300.h: Update. + * config/h8500/tm-h8500.h: Update. + * config/i386/tm-i386.h: Update. + * config/i386/tm-ptx.h: Update. + * config/i386/tm-symmetry.h: Update. + * config/i960/tm-i960.h: Update. + * config/m32r/tm-m32r.h: Update. + * config/m68k/tm-delta68.h: Update. + * config/m68k/tm-linux.h: Update. + * config/m68k/tm-m68k.h: Update. + * config/m88k/tm-m88k.h: Update. + * config/mcore/tm-mcore.h: Update. + * config/mips/tm-mips.h: Update. + * config/mn10200/tm-mn10200.h: Update. + * config/pa/tm-hppa.h: Update. + * config/pa/tm-hppa64.h: Update. + * config/sparc/tm-sp64.h: Update. + * config/sparc/tm-sparc.h: Update. + * config/sparc/tm-sparclet.h: Update. + * config/z8k/tm-z8k.h: Update. + 2002-06-14 Andrew Cagney * Makefile.in (i386_linux_tdep_h): Define. diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index efafcc90078..8a87a8a5e50 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -53,9 +53,9 @@ static gdbarch_register_convert_to_virtual_ftype alpha_register_convert_to_virtual; static gdbarch_register_convert_to_raw_ftype alpha_register_convert_to_raw; static gdbarch_store_struct_return_ftype alpha_store_struct_return; -static gdbarch_extract_return_value_ftype alpha_extract_return_value; +static gdbarch_deprecated_extract_return_value_ftype alpha_extract_return_value; static gdbarch_store_return_value_ftype alpha_store_return_value; -static gdbarch_extract_struct_value_address_ftype +static gdbarch_deprecated_extract_struct_value_address_ftype alpha_extract_struct_value_address; static gdbarch_use_struct_convention_ftype alpha_use_struct_convention; @@ -1872,11 +1872,11 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_get_saved_register (gdbarch, alpha_get_saved_register); set_gdbarch_use_struct_convention (gdbarch, alpha_use_struct_convention); - set_gdbarch_extract_return_value (gdbarch, alpha_extract_return_value); + set_gdbarch_deprecated_extract_return_value (gdbarch, alpha_extract_return_value); set_gdbarch_store_struct_return (gdbarch, alpha_store_struct_return); set_gdbarch_store_return_value (gdbarch, alpha_store_return_value); - set_gdbarch_extract_struct_value_address (gdbarch, + set_gdbarch_deprecated_extract_struct_value_address (gdbarch, alpha_extract_struct_value_address); /* Settings for calling functions in the inferior. */ diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c index 920d27ba95f..cb930b64068 100644 --- a/gdb/arm-linux-tdep.c +++ b/gdb/arm-linux-tdep.c @@ -532,7 +532,7 @@ arm_linux_init_abi (struct gdbarch_info info, sizeof (arm_linux_call_dummy_words)); /* The following two overrides shouldn't be needed. */ - set_gdbarch_extract_return_value (gdbarch, arm_linux_extract_return_value); + set_gdbarch_deprecated_extract_return_value (gdbarch, arm_linux_extract_return_value); set_gdbarch_push_arguments (gdbarch, arm_linux_push_arguments); /* Shared library handling. */ diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 33828fcbe50..e316cf7c2a2 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -2925,11 +2925,11 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_register_name (gdbarch, arm_register_name); /* Returning results. */ - set_gdbarch_extract_return_value (gdbarch, arm_extract_return_value); + set_gdbarch_deprecated_extract_return_value (gdbarch, arm_extract_return_value); set_gdbarch_store_return_value (gdbarch, arm_store_return_value); set_gdbarch_store_struct_return (gdbarch, arm_store_struct_return); set_gdbarch_use_struct_convention (gdbarch, arm_use_struct_convention); - set_gdbarch_extract_struct_value_address (gdbarch, + set_gdbarch_deprecated_extract_struct_value_address (gdbarch, arm_extract_struct_value_address); /* Single stepping. */ diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c index 71c7796443f..43ac3098c72 100644 --- a/gdb/avr-tdep.c +++ b/gdb/avr-tdep.c @@ -1230,7 +1230,7 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_address_to_pointer (gdbarch, avr_address_to_pointer); set_gdbarch_pointer_to_address (gdbarch, avr_pointer_to_address); - set_gdbarch_extract_return_value (gdbarch, avr_extract_return_value); + set_gdbarch_deprecated_extract_return_value (gdbarch, avr_extract_return_value); set_gdbarch_push_arguments (gdbarch, avr_push_arguments); set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame); /* set_gdbarch_push_return_address (gdbarch, avr_push_return_address); */ @@ -1240,8 +1240,8 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_use_struct_convention (gdbarch, generic_use_struct_convention); set_gdbarch_store_struct_return (gdbarch, avr_store_struct_return); - set_gdbarch_extract_struct_value_address (gdbarch, - avr_extract_struct_value_address); + set_gdbarch_deprecated_extract_struct_value_address + (gdbarch, avr_extract_struct_value_address); set_gdbarch_frame_init_saved_regs (gdbarch, avr_scan_prologue); set_gdbarch_init_extra_frame_info (gdbarch, avr_init_extra_frame_info); diff --git a/gdb/config/arc/tm-arc.h b/gdb/config/arc/tm-arc.h index cbdcf41e0e9..af183b60f44 100644 --- a/gdb/config/arc/tm-arc.h +++ b/gdb/config/arc/tm-arc.h @@ -204,14 +204,14 @@ extern void arc_software_single_step (enum target_signal, int); into VALBUF. This is only called if USE_STRUCT_CONVENTION for this type is 0. */ -#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ +#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ memcpy(VALBUF, REGBUF+REGISTER_BYTE(R0_REGNUM), TYPE_LENGTH (TYPE)) /* If USE_STRUCT_CONVENTION produces a 1, extract from an array REGBUF containing the (raw) register state the address in which a function should return its structure value, as a CORE_ADDR (or an expression that can be used as one). */ -#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \ +#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \ (error("Don't know where large structure is returned on arc"), 0) /* Write into appropriate registers a function return value diff --git a/gdb/config/d30v/tm-d30v.h b/gdb/config/d30v/tm-d30v.h index 7a14e39132c..e233630bae8 100644 --- a/gdb/config/d30v/tm-d30v.h +++ b/gdb/config/d30v/tm-d30v.h @@ -188,7 +188,7 @@ void d30v_do_registers_info (int regnum, int fpregs); /* Extract from an array REGBUF containing the (raw) register state the address in which a function should return its structure value, as a CORE_ADDR (or an expression that can be used as one). */ -#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (((CORE_ADDR *)(REGBUF))[2]) +#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (((CORE_ADDR *)(REGBUF))[2]) /* Define other aspects of the stack frame. @@ -291,7 +291,7 @@ extern CORE_ADDR d30v_push_arguments (int, struct value **, CORE_ADDR, int, a function return value of type TYPE, and copy that, in virtual format, into VALBUF. */ -#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ +#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ d30v_extract_return_value(TYPE, REGBUF, VALBUF) extern void d30v_extract_return_value (struct type *, char *, char *); diff --git a/gdb/config/fr30/tm-fr30.h b/gdb/config/fr30/tm-fr30.h index 22ddd046a8e..e54154a2203 100644 --- a/gdb/config/fr30/tm-fr30.h +++ b/gdb/config/fr30/tm-fr30.h @@ -117,14 +117,14 @@ extern void fr30_pop_frame (void); /* Extract from an array REGBUF containing the (raw) register state a function return value of type TYPE, and copy that, in virtual format, into VALBUF. */ -#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ +#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ memcpy (VALBUF, REGBUF + REGISTER_BYTE(RETVAL_REG) + \ (TYPE_LENGTH(TYPE) < 4 ? 4 - TYPE_LENGTH(TYPE) : 0), TYPE_LENGTH (TYPE)) /* Extract from an array REGBUF containing the (raw) register state the address in which a function should return its structure value, as a CORE_ADDR (or an expression that can be used as one). */ -#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \ +#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \ extract_address (REGBUF + REGISTER_BYTE (RETVAL_REG), \ REGISTER_RAW_SIZE (RETVAL_REG)) diff --git a/gdb/config/h8300/tm-h8300.h b/gdb/config/h8300/tm-h8300.h index 08c8cbd808a..c70f4af542e 100644 --- a/gdb/config/h8300/tm-h8300.h +++ b/gdb/config/h8300/tm-h8300.h @@ -166,7 +166,7 @@ extern char **h8300_register_names; /* FIXME: Won't work with both h8/300's. */ extern void h8300_extract_return_value (struct type *, char *, char *); -#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ +#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ h8300_extract_return_value (TYPE, (char *)(REGBUF), (char *)(VALBUF)) /* Write into appropriate registers a function return value @@ -188,7 +188,7 @@ extern void h8300_store_return_value (struct type *, char *); the address in which a function should return its structure value, as a CORE_ADDR (or an expression that can be used as one). */ -#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \ +#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \ extract_address (REGBUF + REGISTER_BYTE (0), \ REGISTER_RAW_SIZE (0)) diff --git a/gdb/config/h8500/tm-h8500.h b/gdb/config/h8500/tm-h8500.h index fae6704c637..96a93b5e75d 100644 --- a/gdb/config/h8500/tm-h8500.h +++ b/gdb/config/h8500/tm-h8500.h @@ -162,7 +162,7 @@ extern struct type *h8500_register_virtual_type (int regno); a function return value of type TYPE, and copy that, in virtual format, into VALBUF. */ -#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ +#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ memcpy (VALBUF, (char *)(REGBUF), TYPE_LENGTH(TYPE)) /* Write into appropriate registers a function return value @@ -175,7 +175,7 @@ extern struct type *h8500_register_virtual_type (int regno); the address in which a function should return its structure value, as a CORE_ADDR (or an expression that can be used as one). */ -#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(CORE_ADDR *)(REGBUF)) +#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(CORE_ADDR *)(REGBUF)) /* Define other aspects of the stack frame. */ diff --git a/gdb/config/i386/tm-i386.h b/gdb/config/i386/tm-i386.h index 4ea574d378c..0ea151b4a14 100644 --- a/gdb/config/i386/tm-i386.h +++ b/gdb/config/i386/tm-i386.h @@ -179,7 +179,7 @@ extern void i386_store_struct_return (CORE_ADDR addr, CORE_ADDR sp); a function return value of type TYPE, and copy that, in virtual format, into VALBUF. */ -#define EXTRACT_RETURN_VALUE(type, regbuf, valbuf) \ +#define DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf) \ i386_extract_return_value ((type), (regbuf), (valbuf)) extern void i386_extract_return_value (struct type *type, char *regbuf, char *valbuf); @@ -195,7 +195,7 @@ extern void i386_store_return_value (struct type *type, char *valbuf); the address in which a function should return its structure value, as a CORE_ADDR. */ -#define EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) \ +#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) \ i386_extract_struct_value_address ((regbuf)) extern CORE_ADDR i386_extract_struct_value_address (char *regbuf); diff --git a/gdb/config/i386/tm-ptx.h b/gdb/config/i386/tm-ptx.h index 2a1731a161c..ff0d56e6174 100644 --- a/gdb/config/i386/tm-ptx.h +++ b/gdb/config/i386/tm-ptx.h @@ -220,8 +220,8 @@ extern const struct floatformat floatformat_i387_ext; /* from floatformat.h */ a function return value of type TYPE, and copy that, in virtual format, into VALBUF. */ -#undef EXTRACT_RETURN_VALUE -#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ +#undef DEPRECATED_EXTRACT_RETURN_VALUE +#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ symmetry_extract_return_value(TYPE, REGBUF, VALBUF) /* diff --git a/gdb/config/i386/tm-symmetry.h b/gdb/config/i386/tm-symmetry.h index 78281819dfa..e7a989b19c2 100644 --- a/gdb/config/i386/tm-symmetry.h +++ b/gdb/config/i386/tm-symmetry.h @@ -308,8 +308,8 @@ switch (regno) { \ a function return value of type TYPE, and copy that, in virtual format, into VALBUF. */ -#undef EXTRACT_RETURN_VALUE -#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ +#undef DEPRECATED_EXTRACT_RETURN_VALUE +#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ symmetry_extract_return_value(TYPE, REGBUF, VALBUF) /* The following redefines make backtracing through sigtramp work. diff --git a/gdb/config/i960/tm-i960.h b/gdb/config/i960/tm-i960.h index a62e35da7e7..a0ae164a658 100644 --- a/gdb/config/i960/tm-i960.h +++ b/gdb/config/i960/tm-i960.h @@ -182,7 +182,7 @@ extern use_struct_convention_fn i960_use_struct_convention; On the i960 we just take as many bytes as we need from G0 through G3. */ -#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ +#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ memcpy(VALBUF, REGBUF+REGISTER_BYTE(G0_REGNUM), TYPE_LENGTH (TYPE)) /* If USE_STRUCT_CONVENTION produces a 1, @@ -195,7 +195,7 @@ extern use_struct_convention_fn i960_use_struct_convention; (..., 0) below is to make it appear to return a value, though actually all it does is call error(). */ -#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \ +#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \ (error("Don't know where large structure is returned on i960"), 0) /* Write into appropriate registers a function return value diff --git a/gdb/config/m32r/tm-m32r.h b/gdb/config/m32r/tm-m32r.h index 75bc7b231a6..9477478c26c 100644 --- a/gdb/config/m32r/tm-m32r.h +++ b/gdb/config/m32r/tm-m32r.h @@ -137,8 +137,8 @@ extern CORE_ADDR m32r_frame_saved_pc (struct frame_info *); /* mvs_check FRAME_SAVED_PC */ #define FRAME_SAVED_PC(fi) m32r_frame_saved_pc (fi) -/* mvs_check EXTRACT_RETURN_VALUE */ -#define EXTRACT_RETURN_VALUE(TYPE, REGBUF, VALBUF) \ +/* mvs_check DEPRECATED_EXTRACT_RETURN_VALUE */ +#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE, REGBUF, VALBUF) \ memcpy ((VALBUF), \ (char *)(REGBUF) + REGISTER_BYTE (V0_REGNUM) + \ ((TYPE_LENGTH (TYPE) > 4 ? 8 : 4) - TYPE_LENGTH (TYPE)), \ @@ -181,7 +181,7 @@ extern void m32r_write_sp (CORE_ADDR val); extern use_struct_convention_fn m32r_use_struct_convention; #define USE_STRUCT_CONVENTION(GCC_P, TYPE) m32r_use_struct_convention (GCC_P, TYPE) -#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \ +#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \ extract_address (REGBUF + REGISTER_BYTE (V0_REGNUM), \ REGISTER_RAW_SIZE (V0_REGNUM)) diff --git a/gdb/config/m68k/tm-delta68.h b/gdb/config/m68k/tm-delta68.h index a38baea2020..7697bc41321 100644 --- a/gdb/config/m68k/tm-delta68.h +++ b/gdb/config/m68k/tm-delta68.h @@ -45,7 +45,7 @@ /* When it returns a float/double value, use fp0 in sysV68. */ /* When it returns a pointer value, use a0 in sysV68. */ -#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ +#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \ REGISTER_CONVERT_TO_VIRTUAL (FP0_REGNUM, TYPE, \ ®BUF[REGISTER_BYTE (FP0_REGNUM)], \ @@ -91,8 +91,8 @@ extern int delta68_frame_num_args (struct frame_info *fi); the address in which a function should return its structure value, as a CORE_ADDR (or an expression that can be used as one). */ -#undef EXTRACT_STRUCT_VALUE_ADDRESS -#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF)\ +#undef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS +#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF)\ (*(CORE_ADDR *)((char*)(REGBUF) + 8 * 4)) extern int delta68_in_sigtramp (CORE_ADDR pc, char *name); diff --git a/gdb/config/m68k/tm-linux.h b/gdb/config/m68k/tm-linux.h index 5e063f32141..8a7d3a5b46c 100644 --- a/gdb/config/m68k/tm-linux.h +++ b/gdb/config/m68k/tm-linux.h @@ -36,7 +36,7 @@ function return value of type TYPE, and copy that, in virtual format, into VALBUF. */ -#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ +#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ { \ if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \ { \ @@ -83,8 +83,8 @@ the address in which a function should return its structure value, as a CORE_ADDR (or an expression that can be used as one). */ -#undef EXTRACT_STRUCT_VALUE_ADDRESS -#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \ +#undef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS +#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \ (*(CORE_ADDR *)((char *) (REGBUF) + REGISTER_BYTE (A0_REGNUM))) /* Offsets (in target ints) into jmp_buf. */ diff --git a/gdb/config/m68k/tm-m68k.h b/gdb/config/m68k/tm-m68k.h index 5b23df0a0be..40bd25aa626 100644 --- a/gdb/config/m68k/tm-m68k.h +++ b/gdb/config/m68k/tm-m68k.h @@ -201,8 +201,8 @@ extern void m68k_find_saved_regs (struct frame_info *, into VALBUF. This is assuming that floating point values are returned as doubles in d0/d1. */ -#if !defined (EXTRACT_RETURN_VALUE) -#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ +#if !defined (DEPRECATED_EXTRACT_RETURN_VALUE) +#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ memcpy ((VALBUF), \ (char *)(REGBUF) + \ (TYPE_LENGTH(TYPE) >= 4 ? 0 : 4 - TYPE_LENGTH(TYPE)), \ @@ -222,7 +222,7 @@ extern void m68k_find_saved_regs (struct frame_info *, the address in which a function should return its structure value, as a CORE_ADDR (or an expression that can be used as one). */ -#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(CORE_ADDR *)(REGBUF)) +#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(CORE_ADDR *)(REGBUF)) /* Describe the pointer in each stack frame to the previous stack frame (its caller). */ diff --git a/gdb/config/m88k/tm-m88k.h b/gdb/config/m88k/tm-m88k.h index 7405c1294f1..22e069db925 100644 --- a/gdb/config/m88k/tm-m88k.h +++ b/gdb/config/m88k/tm-m88k.h @@ -385,10 +385,10 @@ struct type *m88k_register_type (int regnum); /* The 88k call/return conventions call for "small" values to be returned into consecutive registers starting from r2. */ -#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ +#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ memcpy ((VALBUF), &(((char *)REGBUF)[REGISTER_BYTE(RV_REGNUM)]), TYPE_LENGTH (TYPE)) -#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(int *)(REGBUF)) +#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(int *)(REGBUF)) /* Write into appropriate registers a function return value of type TYPE, given in virtual format. */ diff --git a/gdb/config/mcore/tm-mcore.h b/gdb/config/mcore/tm-mcore.h index 1da21b76e64..9806708e14e 100644 --- a/gdb/config/mcore/tm-mcore.h +++ b/gdb/config/mcore/tm-mcore.h @@ -94,13 +94,13 @@ extern void mcore_store_return_value (struct type *type, char *valbuf); #define STORE_RETURN_VALUE(TYPE, VALBUF) mcore_store_return_value ((TYPE), (VALBUF)) extern void mcore_extract_return_value (struct type *type, char *regbut, char *valbuf); -#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ +#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ mcore_extract_return_value ((TYPE), (REGBUF), (VALBUF)); #define STORE_STRUCT_RETURN(ADDR, SP) /* handled by mcore_push_arguments */ extern CORE_ADDR mcore_extract_struct_value_address (char *regbuf); -#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \ +#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \ mcore_extract_struct_value_address (REGBUF) extern CORE_ADDR mcore_skip_prologue (CORE_ADDR pc); diff --git a/gdb/config/mips/tm-mips.h b/gdb/config/mips/tm-mips.h index 3dada3b7074..f573e96fd58 100644 --- a/gdb/config/mips/tm-mips.h +++ b/gdb/config/mips/tm-mips.h @@ -242,7 +242,7 @@ void mips_register_convert_to_raw (struct type *virtual_type, int reg_nr, a function return value of type TYPE, and copy that, in virtual format, into VALBUF. XXX floats */ -#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ +#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ mips_extract_return_value(TYPE, REGBUF, VALBUF) extern void mips_extract_return_value (struct type *, char[], char *); @@ -261,7 +261,7 @@ extern void mips_store_return_value (struct type *, char *); convention is specified by the System V ABI, so I think we can rely on it. */ -#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \ +#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \ (extract_address (REGBUF + REGISTER_BYTE (V0_REGNUM), \ REGISTER_RAW_SIZE (V0_REGNUM))) diff --git a/gdb/config/mn10200/tm-mn10200.h b/gdb/config/mn10200/tm-mn10200.h index 4402b78ba79..7f961301c0d 100644 --- a/gdb/config/mn10200/tm-mn10200.h +++ b/gdb/config/mn10200/tm-mn10200.h @@ -125,7 +125,7 @@ extern CORE_ADDR mn10200_frame_saved_pc (struct frame_info *); a function return value of type TYPE, and copy that, in virtual format, into VALBUF. */ -#define EXTRACT_RETURN_VALUE(TYPE, REGBUF, VALBUF) \ +#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE, REGBUF, VALBUF) \ { \ if (TYPE_LENGTH (TYPE) > 8) \ internal_error (__FILE__, __LINE__, "failed internal consistency check"); \ @@ -144,7 +144,7 @@ extern CORE_ADDR mn10200_frame_saved_pc (struct frame_info *); } \ } -#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \ +#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \ extract_address (REGBUF + REGISTER_BYTE (4), \ REGISTER_RAW_SIZE (4)) diff --git a/gdb/config/pa/tm-hppa.h b/gdb/config/pa/tm-hppa.h index 227108f49ef..0570e6fdf84 100644 --- a/gdb/config/pa/tm-hppa.h +++ b/gdb/config/pa/tm-hppa.h @@ -310,7 +310,7 @@ extern void pa_do_strcat_registers_info (int, int, struct ui_file *, enum precis a function return value of type TYPE, and copy that, in virtual format, into VALBUF. */ -#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ +#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ hppa_extract_return_value (TYPE, REGBUF, VALBUF); /* elz: decide whether the function returning a value of type type @@ -337,20 +337,19 @@ extern use_struct_convention_fn hppa_use_struct_convention; the address in which a function should return its structure value, as a CORE_ADDR (or an expression that can be used as one). */ -#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \ +#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \ (*(int *)((REGBUF) + REGISTER_BYTE (28))) /* elz: Return a large value, which is stored on the stack at addr. - This is defined only for the hppa, at this moment. - The above macro EXTRACT_STRUCT_VALUE_ADDRESS is not called anymore, - because it assumes that on exit from a called function which returns - a large structure on the stack, the address of the ret structure is - still in register 28. Unfortunately this register is usually overwritten - by the called function itself, on hppa. This is specified in the calling - convention doc. As far as I know, the only way to get the return value - is to have the caller tell us where it told the callee to put it, rather - than have the callee tell us. - */ + This is defined only for the hppa, at this moment. The above macro + DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS is not called anymore, + because it assumes that on exit from a called function which + returns a large structure on the stack, the address of the ret + structure is still in register 28. Unfortunately this register is + usually overwritten by the called function itself, on hppa. This is + specified in the calling convention doc. As far as I know, the only + way to get the return value is to have the caller tell us where it + told the callee to put it, rather than have the callee tell us. */ #define VALUE_RETURNED_FROM_STACK(valtype,addr) \ hppa_value_returned_from_stack (valtype, addr) diff --git a/gdb/config/pa/tm-hppa64.h b/gdb/config/pa/tm-hppa64.h index 10fdeede69d..10790e6bb01 100644 --- a/gdb/config/pa/tm-hppa64.h +++ b/gdb/config/pa/tm-hppa64.h @@ -221,13 +221,13 @@ call_dummy #undef REG_STRUCT_HAS_ADDR -#undef EXTRACT_RETURN_VALUE +#undef DEPRECATED_EXTRACT_RETURN_VALUE /* RM: floats are returned in FR4R, doubles in FR4 * integral values are in r28, padded on the left * aggregates less that 65 bits are in r28, right padded * aggregates upto 128 bits are in r28 and r29, right padded */ -#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ +#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ { \ if (TYPE_CODE (TYPE) == TYPE_CODE_FLT && !SOFT_FLOAT) \ memcpy ((VALBUF), \ diff --git a/gdb/config/sparc/tm-sp64.h b/gdb/config/sparc/tm-sp64.h index 8486c860831..4c07f1fc1ba 100644 --- a/gdb/config/sparc/tm-sp64.h +++ b/gdb/config/sparc/tm-sp64.h @@ -273,8 +273,8 @@ extern void sparc64_write_sp (CORE_ADDR); #define TARGET_READ_FP() (sparc64_read_fp ()) #define TARGET_WRITE_SP(X) (sparc64_write_sp (X)) -#undef EXTRACT_RETURN_VALUE -#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ +#undef DEPRECATED_EXTRACT_RETURN_VALUE +#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ sp64_extract_return_value(TYPE, REGBUF, VALBUF, 0) extern void sp64_extract_return_value (struct type *, char[], char *, int); diff --git a/gdb/config/sparc/tm-sparc.h b/gdb/config/sparc/tm-sparc.h index 4a5358036be..07c9e44d2ad 100644 --- a/gdb/config/sparc/tm-sparc.h +++ b/gdb/config/sparc/tm-sparc.h @@ -275,7 +275,7 @@ extern void sparc_store_return_value (struct type *, char *); the address in which a function should return its structure value, as a CORE_ADDR (or an expression that can be used as one). */ -#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \ +#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \ sparc_extract_struct_value_address (REGBUF) extern CORE_ADDR sparc_extract_struct_value_address (char *); @@ -717,7 +717,7 @@ sparc32_push_arguments (int, struct value **, CORE_ADDR, int, CORE_ADDR); function return value of type TYPE, and copy that, in virtual format, into VALBUF. */ -#define EXTRACT_RETURN_VALUE(TYPE, REGBUF, VALBUF) \ +#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE, REGBUF, VALBUF) \ sparc32_extract_return_value (TYPE, REGBUF, VALBUF) extern void sparc32_extract_return_value (struct type *, char[], char *); diff --git a/gdb/config/sparc/tm-sparclet.h b/gdb/config/sparc/tm-sparclet.h index cc52d5a26d5..7771b2779b8 100644 --- a/gdb/config/sparc/tm-sparclet.h +++ b/gdb/config/sparc/tm-sparclet.h @@ -108,8 +108,8 @@ enum { /* sparclet register numbers */ #define CCSR_REGNUM 72 -#undef EXTRACT_RETURN_VALUE -#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ +#undef DEPRECATED_EXTRACT_RETURN_VALUE +#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ { \ memcpy ((VALBUF), \ (char *)(REGBUF) + REGISTER_RAW_SIZE (O0_REGNUM) * 8 + \ diff --git a/gdb/config/z8k/tm-z8k.h b/gdb/config/z8k/tm-z8k.h index 44058554627..194a257c44f 100644 --- a/gdb/config/z8k/tm-z8k.h +++ b/gdb/config/z8k/tm-z8k.h @@ -142,7 +142,7 @@ extern int z8k_saved_pc_after_call (struct frame_info *frame); as doubles in d0/d1. */ -#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ +#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ memcpy(VALBUF, REGBUF + REGISTER_BYTE(2), TYPE_LENGTH(TYPE)); /* Write into appropriate registers a function return value @@ -154,7 +154,7 @@ extern int z8k_saved_pc_after_call (struct frame_info *frame); the address in which a function should return its structure value, as a CORE_ADDR (or an expression that can be used as one). */ -#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(CORE_ADDR *)(REGBUF)) +#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(CORE_ADDR *)(REGBUF)) /* Describe the pointer in each stack frame to the previous stack frame (its caller). */ diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c index e85ac129f33..b28d3bb83f7 100644 --- a/gdb/cris-tdep.c +++ b/gdb/cris-tdep.c @@ -4163,7 +4163,7 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_push_arguments (gdbarch, cris_abi_original_push_arguments); set_gdbarch_store_return_value (gdbarch, cris_abi_original_store_return_value); - set_gdbarch_extract_return_value + set_gdbarch_deprecated_extract_return_value (gdbarch, cris_abi_original_extract_return_value); set_gdbarch_reg_struct_has_addr (gdbarch, cris_abi_original_reg_struct_has_addr); @@ -4173,8 +4173,8 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_double_bit (gdbarch, 64); set_gdbarch_push_arguments (gdbarch, cris_abi_v2_push_arguments); set_gdbarch_store_return_value (gdbarch, cris_abi_v2_store_return_value); - set_gdbarch_extract_return_value (gdbarch, - cris_abi_v2_extract_return_value); + set_gdbarch_deprecated_extract_return_value + (gdbarch, cris_abi_v2_extract_return_value); set_gdbarch_reg_struct_has_addr (gdbarch, cris_abi_v2_reg_struct_has_addr); } @@ -4297,8 +4297,8 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_pop_frame (gdbarch, cris_pop_frame); set_gdbarch_store_struct_return (gdbarch, cris_store_struct_return); - set_gdbarch_extract_struct_value_address (gdbarch, - cris_extract_struct_value_address); + set_gdbarch_deprecated_extract_struct_value_address + (gdbarch, cris_extract_struct_value_address); set_gdbarch_use_struct_convention (gdbarch, cris_use_struct_convention); set_gdbarch_frame_init_saved_regs (gdbarch, cris_frame_init_saved_regs); diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c index 92d1d09ed28..4fe1c6228be 100644 --- a/gdb/d10v-tdep.c +++ b/gdb/d10v-tdep.c @@ -1607,14 +1607,14 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register); set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy); - set_gdbarch_extract_return_value (gdbarch, d10v_extract_return_value); + set_gdbarch_deprecated_extract_return_value (gdbarch, d10v_extract_return_value); set_gdbarch_push_arguments (gdbarch, d10v_push_arguments); set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame); set_gdbarch_push_return_address (gdbarch, d10v_push_return_address); set_gdbarch_store_struct_return (gdbarch, d10v_store_struct_return); set_gdbarch_store_return_value (gdbarch, d10v_store_return_value); - set_gdbarch_extract_struct_value_address (gdbarch, d10v_extract_struct_value_address); + set_gdbarch_deprecated_extract_struct_value_address (gdbarch, d10v_extract_struct_value_address); set_gdbarch_use_struct_convention (gdbarch, d10v_use_struct_convention); set_gdbarch_frame_init_saved_regs (gdbarch, d10v_frame_init_saved_regs); diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index db66cd8d99b..57b6004fa83 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -209,14 +209,14 @@ struct gdbarch gdbarch_address_to_pointer_ftype *address_to_pointer; gdbarch_integer_to_address_ftype *integer_to_address; gdbarch_return_value_on_stack_ftype *return_value_on_stack; - gdbarch_extract_return_value_ftype *extract_return_value; + gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value; gdbarch_push_arguments_ftype *push_arguments; gdbarch_push_dummy_frame_ftype *push_dummy_frame; gdbarch_push_return_address_ftype *push_return_address; gdbarch_pop_frame_ftype *pop_frame; gdbarch_store_struct_return_ftype *store_struct_return; gdbarch_store_return_value_ftype *store_return_value; - gdbarch_extract_struct_value_address_ftype *extract_struct_value_address; + gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address; gdbarch_use_struct_convention_ftype *use_struct_convention; gdbarch_frame_init_saved_regs_ftype *frame_init_saved_regs; gdbarch_init_extra_frame_info_ftype *init_extra_frame_info; @@ -697,8 +697,8 @@ verify_gdbarch (struct gdbarch *gdbarch) /* Skip verify of integer_to_address, has predicate */ /* Skip verify of return_value_on_stack, invalid_p == 0 */ if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) - && (gdbarch->extract_return_value == 0)) - fprintf_unfiltered (log, "\n\textract_return_value"); + && (gdbarch->deprecated_extract_return_value == 0)) + fprintf_unfiltered (log, "\n\tdeprecated_extract_return_value"); /* Skip verify of push_arguments, invalid_p == 0 */ if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && (gdbarch->push_dummy_frame == 0)) @@ -713,7 +713,7 @@ verify_gdbarch (struct gdbarch *gdbarch) if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && (gdbarch->store_return_value == 0)) fprintf_unfiltered (log, "\n\tstore_return_value"); - /* Skip verify of extract_struct_value_address, has predicate */ + /* Skip verify of deprecated_extract_struct_value_address, has predicate */ /* Skip verify of use_struct_convention, invalid_p == 0 */ if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && (gdbarch->frame_init_saved_regs == 0)) @@ -1038,6 +1038,31 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n", (long) DECR_PC_AFTER_BREAK); #endif +#ifdef DEPRECATED_EXTRACT_RETURN_VALUE +#if GDB_MULTI_ARCH + /* Macro might contain `[{}]' when not multi-arch */ + fprintf_unfiltered (file, + "gdbarch_dump: %s # %s\n", + "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)", + XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf))); +#endif + if (GDB_MULTI_ARCH) + fprintf_unfiltered (file, + "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = 0x%08lx\n", + (long) current_gdbarch->deprecated_extract_return_value + /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/); +#endif +#ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS + fprintf_unfiltered (file, + "gdbarch_dump: %s # %s\n", + "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)", + XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf))); + if (GDB_MULTI_ARCH) + fprintf_unfiltered (file, + "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n", + (long) current_gdbarch->deprecated_extract_struct_value_address + /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/); +#endif #ifdef DO_REGISTERS_INFO #if GDB_MULTI_ARCH /* Macro might contain `[{}]' when not multi-arch */ @@ -1113,31 +1138,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) (long) current_gdbarch->elf_make_msymbol_special /*ELF_MAKE_MSYMBOL_SPECIAL ()*/); #endif -#ifdef EXTRACT_RETURN_VALUE -#if GDB_MULTI_ARCH - /* Macro might contain `[{}]' when not multi-arch */ - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)", - XSTRING (EXTRACT_RETURN_VALUE (type, regbuf, valbuf))); -#endif - if (GDB_MULTI_ARCH) - fprintf_unfiltered (file, - "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n", - (long) current_gdbarch->extract_return_value - /*EXTRACT_RETURN_VALUE ()*/); -#endif -#ifdef EXTRACT_STRUCT_VALUE_ADDRESS - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)", - XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf))); - if (GDB_MULTI_ARCH) - fprintf_unfiltered (file, - "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n", - (long) current_gdbarch->extract_struct_value_address - /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/); -#endif #ifdef EXTRA_STACK_ALIGNMENT_NEEDED fprintf_unfiltered (file, "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n", @@ -3744,22 +3744,22 @@ set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch, } void -gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf) +gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf) { gdb_assert (gdbarch != NULL); - if (gdbarch->extract_return_value == 0) + if (gdbarch->deprecated_extract_return_value == 0) internal_error (__FILE__, __LINE__, - "gdbarch: gdbarch_extract_return_value invalid"); + "gdbarch: gdbarch_deprecated_extract_return_value invalid"); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n"); - gdbarch->extract_return_value (type, regbuf, valbuf); + fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n"); + gdbarch->deprecated_extract_return_value (type, regbuf, valbuf); } void -set_gdbarch_extract_return_value (struct gdbarch *gdbarch, - gdbarch_extract_return_value_ftype extract_return_value) +set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, + gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value) { - gdbarch->extract_return_value = extract_return_value; + gdbarch->deprecated_extract_return_value = deprecated_extract_return_value; } CORE_ADDR @@ -3884,29 +3884,29 @@ set_gdbarch_store_return_value (struct gdbarch *gdbarch, } int -gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch) +gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); - return gdbarch->extract_struct_value_address != 0; + return gdbarch->deprecated_extract_struct_value_address != 0; } CORE_ADDR -gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf) +gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf) { gdb_assert (gdbarch != NULL); - if (gdbarch->extract_struct_value_address == 0) + if (gdbarch->deprecated_extract_struct_value_address == 0) internal_error (__FILE__, __LINE__, - "gdbarch: gdbarch_extract_struct_value_address invalid"); + "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid"); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n"); - return gdbarch->extract_struct_value_address (regbuf); + fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n"); + return gdbarch->deprecated_extract_struct_value_address (regbuf); } void -set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, - gdbarch_extract_struct_value_address_ftype extract_struct_value_address) +set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, + gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address) { - gdbarch->extract_struct_value_address = extract_struct_value_address; + gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address; } int diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index db8c3e10445..018e22afb88 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -1460,15 +1460,15 @@ extern void set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch, gdbarch_ #endif #endif -typedef void (gdbarch_extract_return_value_ftype) (struct type *type, char *regbuf, char *valbuf); -extern void gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf); -extern void set_gdbarch_extract_return_value (struct gdbarch *gdbarch, gdbarch_extract_return_value_ftype *extract_return_value); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_RETURN_VALUE) -#error "Non multi-arch definition of EXTRACT_RETURN_VALUE" +typedef void (gdbarch_deprecated_extract_return_value_ftype) (struct type *type, char *regbuf, char *valbuf); +extern void gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf); +extern void set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_RETURN_VALUE) +#error "Non multi-arch definition of DEPRECATED_EXTRACT_RETURN_VALUE" #endif #if GDB_MULTI_ARCH -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_RETURN_VALUE) -#define EXTRACT_RETURN_VALUE(type, regbuf, valbuf) (gdbarch_extract_return_value (current_gdbarch, type, regbuf, valbuf)) +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_EXTRACT_RETURN_VALUE) +#define DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf) (gdbarch_deprecated_extract_return_value (current_gdbarch, type, regbuf, valbuf)) #endif #endif @@ -1574,40 +1574,40 @@ extern void set_gdbarch_store_return_value (struct gdbarch *gdbarch, gdbarch_sto #endif #endif -#if defined (EXTRACT_STRUCT_VALUE_ADDRESS) -/* Legacy for systems yet to multi-arch EXTRACT_STRUCT_VALUE_ADDRESS */ -#if !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P) -#define EXTRACT_STRUCT_VALUE_ADDRESS_P() (1) +#if defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS) +/* Legacy for systems yet to multi-arch DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS */ +#if !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P) +#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (1) #endif #endif /* Default predicate for non- multi-arch targets. */ -#if (!GDB_MULTI_ARCH) && !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P) -#define EXTRACT_STRUCT_VALUE_ADDRESS_P() (0) +#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P) +#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (0) #endif -extern int gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_STRUCT_VALUE_ADDRESS_P) -#error "Non multi-arch definition of EXTRACT_STRUCT_VALUE_ADDRESS" +extern int gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P) +#error "Non multi-arch definition of DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS" #endif -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P) -#define EXTRACT_STRUCT_VALUE_ADDRESS_P() (gdbarch_extract_struct_value_address_p (current_gdbarch)) +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P) +#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (gdbarch_deprecated_extract_struct_value_address_p (current_gdbarch)) #endif /* Default (function) for non- multi-arch platforms. */ -#if (!GDB_MULTI_ARCH) && !defined (EXTRACT_STRUCT_VALUE_ADDRESS) -#define EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (internal_error (__FILE__, __LINE__, "EXTRACT_STRUCT_VALUE_ADDRESS"), 0) +#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS) +#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (internal_error (__FILE__, __LINE__, "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS"), 0) #endif -typedef CORE_ADDR (gdbarch_extract_struct_value_address_ftype) (char *regbuf); -extern CORE_ADDR gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf); -extern void set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, gdbarch_extract_struct_value_address_ftype *extract_struct_value_address); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_STRUCT_VALUE_ADDRESS) -#error "Non multi-arch definition of EXTRACT_STRUCT_VALUE_ADDRESS" +typedef CORE_ADDR (gdbarch_deprecated_extract_struct_value_address_ftype) (char *regbuf); +extern CORE_ADDR gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf); +extern void set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS) +#error "Non multi-arch definition of DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS" #endif #if GDB_MULTI_ARCH -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_STRUCT_VALUE_ADDRESS) -#define EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (gdbarch_extract_struct_value_address (current_gdbarch, regbuf)) +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS) +#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (gdbarch_deprecated_extract_struct_value_address (current_gdbarch, regbuf)) #endif #endif diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index c0e9586ce4b..5735d208a3f 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -528,7 +528,7 @@ f:2:ADDRESS_TO_POINTER:void:address_to_pointer:struct type *type, void *buf, COR F:2:INTEGER_TO_ADDRESS:CORE_ADDR:integer_to_address:struct type *type, void *buf:type, buf # f:2:RETURN_VALUE_ON_STACK:int:return_value_on_stack:struct type *type:type:::generic_return_value_on_stack_not::0 -f:2:EXTRACT_RETURN_VALUE:void:extract_return_value:struct type *type, char *regbuf, char *valbuf:type, regbuf, valbuf::0:0 +f:2:DEPRECATED_EXTRACT_RETURN_VALUE:void:deprecated_extract_return_value:struct type *type, char *regbuf, char *valbuf:type, regbuf, valbuf::0:0 f:2:PUSH_ARGUMENTS:CORE_ADDR:push_arguments:int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr:nargs, args, sp, struct_return, struct_addr:::default_push_arguments::0 f:2:PUSH_DUMMY_FRAME:void:push_dummy_frame:void:-:::0 F:2:PUSH_RETURN_ADDRESS:CORE_ADDR:push_return_address:CORE_ADDR pc, CORE_ADDR sp:pc, sp:::0 @@ -536,7 +536,7 @@ f:2:POP_FRAME:void:pop_frame:void:-:::0 # f:2:STORE_STRUCT_RETURN:void:store_struct_return:CORE_ADDR addr, CORE_ADDR sp:addr, sp:::0 f:2:STORE_RETURN_VALUE:void:store_return_value:struct type *type, char *valbuf:type, valbuf:::0 -F:2:EXTRACT_STRUCT_VALUE_ADDRESS:CORE_ADDR:extract_struct_value_address:char *regbuf:regbuf:::0 +F:2:DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS:CORE_ADDR:deprecated_extract_struct_value_address:char *regbuf:regbuf:::0 f:2:USE_STRUCT_CONVENTION:int:use_struct_convention:int gcc_p, struct type *value_type:gcc_p, value_type:::generic_use_struct_convention::0 # f:2:FRAME_INIT_SAVED_REGS:void:frame_init_saved_regs:struct frame_info *frame:frame::0:0 diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c index ab7e4674f75..44210d7d065 100644 --- a/gdb/ia64-tdep.c +++ b/gdb/ia64-tdep.c @@ -96,8 +96,8 @@ static gdbarch_frame_saved_pc_ftype ia64_frame_saved_pc; static gdbarch_skip_prologue_ftype ia64_skip_prologue; static gdbarch_frame_init_saved_regs_ftype ia64_frame_init_saved_regs; static gdbarch_get_saved_register_ftype ia64_get_saved_register; -static gdbarch_extract_return_value_ftype ia64_extract_return_value; -static gdbarch_extract_struct_value_address_ftype ia64_extract_struct_value_address; +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; static gdbarch_frameless_function_invocation_ftype ia64_frameless_function_invocation; static gdbarch_init_extra_frame_info_ftype ia64_init_extra_frame_info; @@ -2190,11 +2190,11 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_register_convert_to_raw (gdbarch, ia64_register_convert_to_raw); set_gdbarch_use_struct_convention (gdbarch, ia64_use_struct_convention); - set_gdbarch_extract_return_value (gdbarch, ia64_extract_return_value); + set_gdbarch_deprecated_extract_return_value (gdbarch, ia64_extract_return_value); set_gdbarch_store_struct_return (gdbarch, ia64_store_struct_return); set_gdbarch_store_return_value (gdbarch, ia64_store_return_value); - set_gdbarch_extract_struct_value_address (gdbarch, ia64_extract_struct_value_address); + set_gdbarch_deprecated_extract_struct_value_address (gdbarch, ia64_extract_struct_value_address); set_gdbarch_memory_insert_breakpoint (gdbarch, ia64_memory_insert_breakpoint); set_gdbarch_memory_remove_breakpoint (gdbarch, ia64_memory_remove_breakpoint); diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c index 6d00ab1faf5..38ec7e348e4 100644 --- a/gdb/m68hc11-tdep.c +++ b/gdb/m68hc11-tdep.c @@ -1117,7 +1117,7 @@ m68hc11_gdbarch_init (struct gdbarch_info info, set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0); set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register); set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy); - set_gdbarch_extract_return_value (gdbarch, m68hc11_extract_return_value); + set_gdbarch_deprecated_extract_return_value (gdbarch, m68hc11_extract_return_value); set_gdbarch_push_arguments (gdbarch, m68hc11_push_arguments); set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame); set_gdbarch_push_return_address (gdbarch, m68hc11_push_return_address); @@ -1125,8 +1125,7 @@ m68hc11_gdbarch_init (struct gdbarch_info info, set_gdbarch_store_struct_return (gdbarch, m68hc11_store_struct_return); set_gdbarch_store_return_value (gdbarch, m68hc11_store_return_value); - set_gdbarch_extract_struct_value_address (gdbarch, - m68hc11_extract_struct_value_address); + set_gdbarch_deprecated_extract_struct_value_address (gdbarch, m68hc11_extract_struct_value_address); set_gdbarch_register_convertible (gdbarch, generic_register_convertible_not); @@ -1143,7 +1142,7 @@ m68hc11_gdbarch_init (struct gdbarch_info info, set_gdbarch_store_struct_return (gdbarch, m68hc11_store_struct_return); set_gdbarch_store_return_value (gdbarch, m68hc11_store_return_value); - set_gdbarch_extract_struct_value_address + set_gdbarch_deprecated_extract_struct_value_address (gdbarch, m68hc11_extract_struct_value_address); set_gdbarch_use_struct_convention (gdbarch, m68hc11_use_struct_convention); set_gdbarch_init_extra_frame_info (gdbarch, m68hc11_init_extra_frame_info); diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c index 0a5704b1704..5d3da69c0b9 100644 --- a/gdb/mn10300-tdep.c +++ b/gdb/mn10300-tdep.c @@ -1171,8 +1171,8 @@ mn10300_gdbarch_init (struct gdbarch_info info, set_gdbarch_frame_init_saved_regs (gdbarch, mn10300_frame_init_saved_regs); set_gdbarch_frame_chain (gdbarch, mn10300_frame_chain); set_gdbarch_frame_saved_pc (gdbarch, mn10300_frame_saved_pc); - set_gdbarch_extract_return_value (gdbarch, mn10300_extract_return_value); - set_gdbarch_extract_struct_value_address + set_gdbarch_deprecated_extract_return_value (gdbarch, mn10300_extract_return_value); + set_gdbarch_deprecated_extract_struct_value_address (gdbarch, mn10300_extract_struct_value_address); set_gdbarch_store_return_value (gdbarch, mn10300_store_return_value); set_gdbarch_store_struct_return (gdbarch, mn10300_store_struct_return); diff --git a/gdb/ns32k-tdep.c b/gdb/ns32k-tdep.c index 5d4a885674b..4e9f9608f91 100644 --- a/gdb/ns32k-tdep.c +++ b/gdb/ns32k-tdep.c @@ -620,9 +620,9 @@ ns32k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Return value info */ set_gdbarch_store_struct_return (gdbarch, ns32k_store_struct_return); - set_gdbarch_extract_return_value (gdbarch, ns32k_extract_return_value); + set_gdbarch_deprecated_extract_return_value (gdbarch, ns32k_extract_return_value); set_gdbarch_store_return_value (gdbarch, ns32k_store_return_value); - set_gdbarch_extract_struct_value_address (gdbarch, + set_gdbarch_deprecated_extract_struct_value_address (gdbarch, ns32k_extract_struct_value_address); /* Call dummy info */ diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index f91de78898d..ee66d6bd429 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -2619,7 +2619,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_register_convert_to_raw (gdbarch, rs6000_register_convert_to_raw); set_gdbarch_stab_reg_to_regnum (gdbarch, rs6000_stab_reg_to_regnum); - set_gdbarch_extract_return_value (gdbarch, rs6000_extract_return_value); + set_gdbarch_deprecated_extract_return_value (gdbarch, rs6000_extract_return_value); /* 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 @@ -2635,7 +2635,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_store_struct_return (gdbarch, rs6000_store_struct_return); set_gdbarch_store_return_value (gdbarch, rs6000_store_return_value); - set_gdbarch_extract_struct_value_address (gdbarch, rs6000_extract_struct_value_address); + set_gdbarch_deprecated_extract_struct_value_address (gdbarch, rs6000_extract_struct_value_address); set_gdbarch_pop_frame (gdbarch, rs6000_pop_frame); set_gdbarch_skip_prologue (gdbarch, rs6000_skip_prologue); diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index c69aca69fa3..8add4952f19 100644 --- a/gdb/s390-tdep.c +++ b/gdb/s390-tdep.c @@ -1773,7 +1773,7 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* We can't do this */ set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown); set_gdbarch_store_struct_return (gdbarch, s390_store_struct_return); - set_gdbarch_extract_return_value (gdbarch, s390_extract_return_value); + set_gdbarch_deprecated_extract_return_value (gdbarch, s390_extract_return_value); set_gdbarch_store_return_value (gdbarch, s390_store_return_value); /* Amount PC must be decremented by after a breakpoint. This is often the number of bytes in BREAKPOINT @@ -1818,7 +1818,7 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_stab_reg_to_regnum (gdbarch, s390_stab_reg_to_regnum); set_gdbarch_dwarf_reg_to_regnum (gdbarch, s390_stab_reg_to_regnum); set_gdbarch_dwarf2_reg_to_regnum (gdbarch, s390_stab_reg_to_regnum); - set_gdbarch_extract_struct_value_address + set_gdbarch_deprecated_extract_struct_value_address (gdbarch, generic_cannot_extract_struct_value_address); /* Parameters for inferior function calls. */ diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c index 924b675a276..375b55a6b66 100644 --- a/gdb/sh-tdep.c +++ b/gdb/sh-tdep.c @@ -4270,11 +4270,11 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_frame_chain (gdbarch, sh_frame_chain); set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register); set_gdbarch_init_extra_frame_info (gdbarch, sh_init_extra_frame_info); - set_gdbarch_extract_return_value (gdbarch, sh_extract_return_value); + set_gdbarch_deprecated_extract_return_value (gdbarch, sh_extract_return_value); set_gdbarch_push_arguments (gdbarch, sh_push_arguments); set_gdbarch_store_struct_return (gdbarch, sh_store_struct_return); set_gdbarch_use_struct_convention (gdbarch, sh_use_struct_convention); - set_gdbarch_extract_struct_value_address (gdbarch, sh_extract_struct_value_address); + set_gdbarch_deprecated_extract_struct_value_address (gdbarch, sh_extract_struct_value_address); set_gdbarch_pop_frame (gdbarch, sh_pop_frame); set_gdbarch_print_insn (gdbarch, gdb_print_insn_sh); skip_prologue_hard_way = sh_skip_prologue_hard_way; @@ -4347,7 +4347,7 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_register_raw_size (gdbarch, sh_default_register_raw_size); set_gdbarch_register_virtual_size (gdbarch, sh_default_register_raw_size); set_gdbarch_register_byte (gdbarch, sh_default_register_byte); - set_gdbarch_extract_return_value (gdbarch, sh3e_sh4_extract_return_value); + set_gdbarch_deprecated_extract_return_value (gdbarch, sh3e_sh4_extract_return_value); set_gdbarch_fp0_regnum (gdbarch, 25); tdep->FPUL_REGNUM = 23; tdep->FPSCR_REGNUM = 24; @@ -4387,7 +4387,7 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) sh_store_return_value = sh3e_sh4_store_return_value; sh_register_virtual_type = sh_sh4_register_virtual_type; set_gdbarch_frame_init_saved_regs (gdbarch, sh_fp_frame_init_saved_regs); - set_gdbarch_extract_return_value (gdbarch, sh3e_sh4_extract_return_value); + set_gdbarch_deprecated_extract_return_value (gdbarch, sh3e_sh4_extract_return_value); set_gdbarch_fp0_regnum (gdbarch, 25); set_gdbarch_register_raw_size (gdbarch, sh_sh4_register_raw_size); set_gdbarch_register_virtual_size (gdbarch, sh_sh4_register_raw_size); @@ -4496,10 +4496,10 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_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_extract_return_value (gdbarch, sh64_extract_return_value); + 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_extract_struct_value_address (gdbarch, sh64_extract_struct_value_address); + set_gdbarch_deprecated_extract_struct_value_address (gdbarch, sh64_extract_struct_value_address); set_gdbarch_use_struct_convention (gdbarch, sh64_use_struct_convention); set_gdbarch_pop_frame (gdbarch, sh64_pop_frame); set_gdbarch_elf_make_msymbol_special (gdbarch, diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c index 7db55e613d4..6ad95c48dc8 100644 --- a/gdb/sparc-tdep.c +++ b/gdb/sparc-tdep.c @@ -3002,8 +3002,7 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 1); set_gdbarch_decr_pc_after_break (gdbarch, 0); set_gdbarch_double_bit (gdbarch, 8 * TARGET_CHAR_BIT); - set_gdbarch_extract_struct_value_address (gdbarch, - sparc_extract_struct_value_address); + set_gdbarch_deprecated_extract_struct_value_address (gdbarch, sparc_extract_struct_value_address); set_gdbarch_fix_call_dummy (gdbarch, sparc_gdbarch_fix_call_dummy); set_gdbarch_float_bit (gdbarch, 4 * TARGET_CHAR_BIT); set_gdbarch_fp_regnum (gdbarch, SPARC_FP_REGNUM); @@ -3217,7 +3216,7 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) switch (info.bfd_arch_info->mach) { case bfd_mach_sparc: - set_gdbarch_extract_return_value (gdbarch, sparc32_extract_return_value); + set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value); set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid); set_gdbarch_num_regs (gdbarch, 72); set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4); @@ -3228,8 +3227,7 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) tdep->print_insn_mach = bfd_mach_sparc; break; case bfd_mach_sparc_sparclet: - set_gdbarch_extract_return_value (gdbarch, - sparclet_extract_return_value); + set_gdbarch_deprecated_extract_return_value (gdbarch, sparclet_extract_return_value); set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid); set_gdbarch_num_regs (gdbarch, 32 + 32 + 8 + 8 + 8); set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4 + 8*4 + 8*4); @@ -3240,7 +3238,7 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) tdep->print_insn_mach = bfd_mach_sparc_sparclet; break; case bfd_mach_sparc_sparclite: - set_gdbarch_extract_return_value (gdbarch, sparc32_extract_return_value); + set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value); set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid); set_gdbarch_num_regs (gdbarch, 80); set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4 + 8*4); @@ -3251,7 +3249,7 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) tdep->print_insn_mach = bfd_mach_sparc_sparclite; break; case bfd_mach_sparc_v8plus: - set_gdbarch_extract_return_value (gdbarch, sparc32_extract_return_value); + set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value); set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid); set_gdbarch_num_regs (gdbarch, 72); set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4); @@ -3262,7 +3260,7 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) tdep->has_fpu = 1; /* (all but sparclet and sparclite) */ break; case bfd_mach_sparc_v8plusa: - set_gdbarch_extract_return_value (gdbarch, sparc32_extract_return_value); + set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value); set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid); set_gdbarch_num_regs (gdbarch, 72); set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4); @@ -3273,7 +3271,7 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) tdep->print_insn_mach = bfd_mach_sparc; break; case bfd_mach_sparc_sparclite_le: - set_gdbarch_extract_return_value (gdbarch, sparc32_extract_return_value); + set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value); set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid); set_gdbarch_num_regs (gdbarch, 80); set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4 + 8*4); @@ -3284,7 +3282,7 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) tdep->print_insn_mach = bfd_mach_sparc_sparclite; break; case bfd_mach_sparc_v9: - set_gdbarch_extract_return_value (gdbarch, sparc64_extract_return_value); + set_gdbarch_deprecated_extract_return_value (gdbarch, sparc64_extract_return_value); set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid); set_gdbarch_num_regs (gdbarch, 125); set_gdbarch_register_bytes (gdbarch, 32*8 + 32*8 + 45*8); @@ -3295,7 +3293,7 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) tdep->print_insn_mach = bfd_mach_sparc_v9a; break; case bfd_mach_sparc_v9a: - set_gdbarch_extract_return_value (gdbarch, sparc64_extract_return_value); + set_gdbarch_deprecated_extract_return_value (gdbarch, sparc64_extract_return_value); set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid); set_gdbarch_num_regs (gdbarch, 125); set_gdbarch_register_bytes (gdbarch, 32*8 + 32*8 + 45*8); diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c index d010dd15fcd..dc3bc6ba9e0 100644 --- a/gdb/v850-tdep.c +++ b/gdb/v850-tdep.c @@ -1270,12 +1270,12 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_use_generic_dummy_frames (gdbarch, 1); set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame); set_gdbarch_push_return_address (gdbarch, v850_push_return_address); - set_gdbarch_extract_return_value (gdbarch, v850_extract_return_value); + set_gdbarch_deprecated_extract_return_value (gdbarch, v850_extract_return_value); set_gdbarch_push_arguments (gdbarch, v850_push_arguments); set_gdbarch_pop_frame (gdbarch, v850_pop_frame); set_gdbarch_store_struct_return (gdbarch, v850_store_struct_return); set_gdbarch_store_return_value (gdbarch, v850_store_return_value); - set_gdbarch_extract_struct_value_address (gdbarch, v850_extract_struct_value_address); + set_gdbarch_deprecated_extract_struct_value_address (gdbarch, v850_extract_struct_value_address); set_gdbarch_use_struct_convention (gdbarch, v850_use_struct_convention); set_gdbarch_call_dummy_location (gdbarch, AT_ENTRY_POINT); set_gdbarch_call_dummy_address (gdbarch, entry_point_address); diff --git a/gdb/values.c b/gdb/values.c index 225dd218bb5..28f0f4f7103 100644 --- a/gdb/values.c +++ b/gdb/values.c @@ -1229,6 +1229,7 @@ value_being_returned (struct type *valtype, char *retbuf, int struct_return) struct value *val; CORE_ADDR addr; +#if 0 /* If this is not defined, just use EXTRACT_RETURN_VALUE instead. */ if (EXTRACT_STRUCT_VALUE_ADDRESS_P ()) if (struct_return) @@ -1238,9 +1239,21 @@ value_being_returned (struct type *valtype, char *retbuf, int struct_return) error ("Function return value unknown."); return value_at (valtype, addr, NULL); } +#endif + + /* If this is not defined, just use EXTRACT_RETURN_VALUE instead. */ + if (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()) + if (struct_return) + { + addr = DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (retbuf); + if (!addr) + error ("Function return value unknown."); + return value_at (valtype, addr, NULL); + } val = allocate_value (valtype); CHECK_TYPEDEF (valtype); +#define EXTRACT_RETURN_VALUE DEPRECATED_EXTRACT_RETURN_VALUE EXTRACT_RETURN_VALUE (valtype, retbuf, VALUE_CONTENTS_RAW (val)); return val; diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c index 0478227ee92..2e82d927e10 100644 --- a/gdb/vax-tdep.c +++ b/gdb/vax-tdep.c @@ -48,9 +48,9 @@ static gdbarch_frame_init_saved_regs_ftype vax_frame_init_saved_regs; static gdbarch_get_saved_register_ftype vax_get_saved_register; static gdbarch_store_struct_return_ftype vax_store_struct_return; -static gdbarch_extract_return_value_ftype vax_extract_return_value; +static gdbarch_deprecated_extract_return_value_ftype vax_extract_return_value; static gdbarch_store_return_value_ftype vax_store_return_value; -static gdbarch_extract_struct_value_address_ftype +static gdbarch_deprecated_extract_struct_value_address_ftype vax_extract_struct_value_address; static gdbarch_push_dummy_frame_ftype vax_push_dummy_frame; @@ -671,10 +671,9 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Return value info */ set_gdbarch_store_struct_return (gdbarch, vax_store_struct_return); - set_gdbarch_extract_return_value (gdbarch, vax_extract_return_value); + set_gdbarch_deprecated_extract_return_value (gdbarch, vax_extract_return_value); set_gdbarch_store_return_value (gdbarch, vax_store_return_value); - set_gdbarch_extract_struct_value_address (gdbarch, - vax_extract_struct_value_address); + set_gdbarch_deprecated_extract_struct_value_address (gdbarch, vax_extract_struct_value_address); /* Call dummy info */ set_gdbarch_push_dummy_frame (gdbarch, vax_push_dummy_frame); diff --git a/gdb/x86-64-tdep.c b/gdb/x86-64-tdep.c index a7b9d0b4cf1..111861aaafe 100644 --- a/gdb/x86-64-tdep.c +++ b/gdb/x86-64-tdep.c @@ -1076,7 +1076,7 @@ x86_64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Return number of args passed to a frame, no way to tell. */ set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown); /* Don't use default structure extract routine */ - set_gdbarch_extract_struct_value_address (gdbarch, 0); + set_gdbarch_deprecated_extract_struct_value_address (gdbarch, 0); /* If USE_STRUCT_CONVENTION retruns 0, then gdb uses STORE_RETURN_VALUE and EXTRACT_RETURN_VALUE to store/fetch the functions return value. It is @@ -1090,7 +1090,7 @@ x86_64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Extract from an array REGBUF containing the (raw) register state a function return value of type TYPE, and copy that, in virtual format, into VALBUF. */ - set_gdbarch_extract_return_value (gdbarch, x86_64_extract_return_value); + set_gdbarch_deprecated_extract_return_value (gdbarch, x86_64_extract_return_value); /* Write into the appropriate registers a function return value stored diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c index f8c20b70f28..9be59718918 100644 --- a/gdb/xstormy16-tdep.c +++ b/gdb/xstormy16-tdep.c @@ -1086,13 +1086,12 @@ xstormy16_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_use_generic_dummy_frames (gdbarch, 1); set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame); set_gdbarch_push_return_address (gdbarch, xstormy16_push_return_address); - set_gdbarch_extract_return_value (gdbarch, xstormy16_extract_return_value); + set_gdbarch_deprecated_extract_return_value (gdbarch, xstormy16_extract_return_value); set_gdbarch_push_arguments (gdbarch, xstormy16_push_arguments); set_gdbarch_pop_frame (gdbarch, xstormy16_pop_frame); set_gdbarch_store_struct_return (gdbarch, xstormy16_store_struct_return); set_gdbarch_store_return_value (gdbarch, xstormy16_store_return_value); - set_gdbarch_extract_struct_value_address (gdbarch, - xstormy16_extract_struct_value_address); + set_gdbarch_deprecated_extract_struct_value_address (gdbarch, xstormy16_extract_struct_value_address); set_gdbarch_use_struct_convention (gdbarch, xstormy16_use_struct_convention); set_gdbarch_call_dummy_location (gdbarch, AT_ENTRY_POINT);