aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog32
-rw-r--r--gdb/alpha-tdep.c3
-rw-r--r--gdb/arm-tdep.c2
-rw-r--r--gdb/avr-tdep.c2
-rw-r--r--gdb/cris-tdep.c2
-rw-r--r--gdb/d10v-tdep.c26
-rw-r--r--gdb/frv-tdep.c3
-rw-r--r--gdb/gdbarch.c66
-rw-r--r--gdb/gdbarch.h41
-rwxr-xr-xgdb/gdbarch.sh4
-rw-r--r--gdb/h8300-tdep.c2
-rw-r--r--gdb/hppa-tdep.c2
-rw-r--r--gdb/i386-tdep.c2
-rw-r--r--gdb/ia64-tdep.c3
-rw-r--r--gdb/m68hc11-tdep.c4
-rw-r--r--gdb/m68k-tdep.c2
-rw-r--r--gdb/mcore-tdep.c2
-rw-r--r--gdb/mips-tdep.c2
-rw-r--r--gdb/mn10300-tdep.c2
-rw-r--r--gdb/ns32k-tdep.c2
-rw-r--r--gdb/rs6000-tdep.c2
-rw-r--r--gdb/s390-tdep.c2
-rw-r--r--gdb/sh-tdep.c4
-rw-r--r--gdb/sparc-tdep.c4
-rw-r--r--gdb/v850-tdep.c2
-rw-r--r--gdb/valops.c15
-rw-r--r--gdb/vax-tdep.c3
-rw-r--r--gdb/x86-64-tdep.c2
-rw-r--r--gdb/xstormy16-tdep.c2
29 files changed, 146 insertions, 94 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f76cf56..81f4ed7 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,37 @@
2003-03-25 Andrew Cagney <cagney@redhat.com>
+ * gdbarch.sh (DEPRECATED_STORE_STRUCT_RETURN): Replace
+ STORE_STRUCT_RETURN.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * d10v-tdep.c (d10v_store_struct_return): Delete function.
+ (d10v_push_arguments): Set the struct return register.
+ (d10v_gdbarch_init): Update.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Update.
+ * x86-64-tdep.c (x86_64_init_abi): Update.
+ * vax-tdep.c (vax_gdbarch_init): Update.
+ * v850-tdep.c (v850_gdbarch_init): Update.
+ * sparc-tdep.c (sparc_gdbarch_init): Update.
+ * sh-tdep.c (sh_gdbarch_init): Update.
+ * s390-tdep.c (s390_gdbarch_init): Update.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Update.
+ * ns32k-tdep.c (ns32k_gdbarch_init): Update.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Update.
+ * mips-tdep.c (mips_gdbarch_init): Update.
+ * mcore-tdep.c (mcore_gdbarch_init): Update.
+ * m68k-tdep.c (m68k_gdbarch_init): Update.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
+ * ia64-tdep.c (ia64_gdbarch_init): Update.
+ * i386-tdep.c (i386_gdbarch_init): Update.
+ * hppa-tdep.c (hppa_gdbarch_init): Update.
+ * h8300-tdep.c (h8300_gdbarch_init): Update.
+ * frv-tdep.c (frv_gdbarch_init): Update.
+ * cris-tdep.c (cris_gdbarch_init): Update.
+ * avr-tdep.c (avr_gdbarch_init): Update.
+ * arm-tdep.c (arm_gdbarch_init): Update.
+ * alpha-tdep.c (alpha_gdbarch_init): Update.
+
+2003-03-25 Andrew Cagney <cagney@redhat.com>
+
* gdbarch.sh (CALL_DUMMY_STACK_ADJUST_P): Delete.
(DEPRECATED_CALL_DUMMY_STACK_ADJUST): Replace
CALL_DUMMY_STACK_ADJUST with a predicate variable.
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index 762b996..a6449e1 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -54,7 +54,6 @@ static gdbarch_register_convertible_ftype alpha_register_convertible;
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_deprecated_extract_return_value_ftype alpha_extract_return_value;
static gdbarch_deprecated_extract_struct_value_address_ftype
alpha_extract_struct_value_address;
@@ -1846,7 +1845,7 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_use_struct_convention (gdbarch, alpha_use_struct_convention);
set_gdbarch_deprecated_extract_return_value (gdbarch, alpha_extract_return_value);
- set_gdbarch_store_struct_return (gdbarch, alpha_store_struct_return);
+ set_gdbarch_deprecated_store_struct_return (gdbarch, alpha_store_struct_return);
set_gdbarch_deprecated_store_return_value (gdbarch, alpha_store_return_value);
set_gdbarch_deprecated_extract_struct_value_address (gdbarch,
alpha_extract_struct_value_address);
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 00ccd17..dbe1483 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -2994,7 +2994,7 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Returning results. */
set_gdbarch_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_deprecated_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,
arm_extract_struct_value_address);
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index 52994bf..7358837 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -1185,7 +1185,7 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_pop_frame (gdbarch, avr_pop_frame);
set_gdbarch_use_struct_convention (gdbarch, generic_use_struct_convention);
- set_gdbarch_store_struct_return (gdbarch, avr_store_struct_return);
+ set_gdbarch_deprecated_store_struct_return (gdbarch, avr_store_struct_return);
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, avr_scan_prologue);
set_gdbarch_deprecated_init_extra_frame_info (gdbarch, avr_init_extra_frame_info);
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index fcd0990..f075050 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -4286,7 +4286,7 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_push_return_address (gdbarch, cris_push_return_address);
set_gdbarch_deprecated_pop_frame (gdbarch, cris_pop_frame);
- set_gdbarch_store_struct_return (gdbarch, cris_store_struct_return);
+ set_gdbarch_deprecated_store_struct_return (gdbarch, cris_store_struct_return);
set_gdbarch_deprecated_extract_struct_value_address
(gdbarch, cris_extract_struct_value_address);
set_gdbarch_use_struct_convention (gdbarch, cris_use_struct_convention);
diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c
index f125fd1..583f8b1 100644
--- a/gdb/d10v-tdep.c
+++ b/gdb/d10v-tdep.c
@@ -437,18 +437,6 @@ d10v_integer_to_address (struct type *type, void *buf)
return val;
}
-/* Store the address of the place in which to copy the structure the
- subroutine will return. This is called from call_function.
-
- We store structs through a pointer passed in the first Argument
- register. */
-
-static void
-d10v_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
-{
- write_register (ARG1_REGNUM, (addr));
-}
-
/* Write into appropriate registers a function return value
of type TYPE, given in virtual format.
@@ -1030,13 +1018,14 @@ d10v_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
struct stack_item *si = NULL;
long val;
- /* If struct_return is true, then the struct return address will
- consume one argument-passing register. No need to actually
- write the value to the register -- that's done by
- d10v_store_struct_return(). */
-
+ /* If STRUCT_RETURN is true, then the struct return address (in
+ STRUCT_ADDR) will consume the first argument-passing register.
+ Both adjust the register count and store that value. */
if (struct_return)
- regnum++;
+ {
+ write_register (regnum, struct_addr);
+ regnum++;
+ }
/* Fill in registers and arg lists */
for (i = 0; i < nargs; i++)
@@ -1706,7 +1695,6 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_push_arguments (gdbarch, d10v_push_arguments);
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_use_struct_convention (gdbarch, d10v_use_struct_convention);
diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c
index 3a67a7f..cb8dc55 100644
--- a/gdb/frv-tdep.c
+++ b/gdb/frv-tdep.c
@@ -41,7 +41,6 @@ static gdbarch_deprecated_extract_struct_value_address_ftype frv_extract_struct_
static gdbarch_use_struct_convention_ftype frv_use_struct_convention;
static gdbarch_frameless_function_invocation_ftype frv_frameless_function_invocation;
static gdbarch_init_extra_frame_info_ftype stupid_useless_init_extra_frame_info;
-static gdbarch_store_struct_return_ftype frv_store_struct_return;
static gdbarch_push_arguments_ftype frv_push_arguments;
static gdbarch_push_return_address_ftype frv_push_return_address;
static gdbarch_saved_pc_after_call_ftype frv_saved_pc_after_call;
@@ -1085,7 +1084,7 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_use_struct_convention (gdbarch, frv_use_struct_convention);
set_gdbarch_deprecated_extract_return_value (gdbarch, frv_extract_return_value);
- set_gdbarch_store_struct_return (gdbarch, frv_store_struct_return);
+ set_gdbarch_deprecated_store_struct_return (gdbarch, frv_store_struct_return);
set_gdbarch_deprecated_store_return_value (gdbarch, frv_store_return_value);
set_gdbarch_deprecated_extract_struct_value_address (gdbarch, frv_extract_struct_value_address);
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index d3010c1..ba7fdb5 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -216,7 +216,7 @@ struct gdbarch
gdbarch_deprecated_push_dummy_frame_ftype *deprecated_push_dummy_frame;
gdbarch_push_return_address_ftype *push_return_address;
gdbarch_deprecated_pop_frame_ftype *deprecated_pop_frame;
- gdbarch_store_struct_return_ftype *store_struct_return;
+ gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return;
gdbarch_extract_return_value_ftype *extract_return_value;
gdbarch_store_return_value_ftype *store_return_value;
gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value;
@@ -718,9 +718,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of deprecated_push_dummy_frame, has predicate */
/* Skip verify of push_return_address, has predicate */
/* Skip verify of deprecated_pop_frame, has predicate */
- if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
- && (gdbarch->store_struct_return == 0))
- fprintf_unfiltered (log, "\n\tstore_struct_return");
+ /* Skip verify of deprecated_store_struct_return, has predicate */
/* Skip verify of extract_return_value, invalid_p == 0 */
/* Skip verify of store_return_value, invalid_p == 0 */
/* Skip verify of extract_struct_value_address, has predicate */
@@ -1445,6 +1443,29 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->deprecated_store_return_value
/*DEPRECATED_STORE_RETURN_VALUE ()*/);
#endif
+#ifdef DEPRECATED_STORE_STRUCT_RETURN_P
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_STORE_STRUCT_RETURN_P()",
+ XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN_P() = %d\n",
+ DEPRECATED_STORE_STRUCT_RETURN_P ());
+#endif
+#ifdef DEPRECATED_STORE_STRUCT_RETURN
+#if GDB_MULTI_ARCH
+ /* Macro might contain `[{}]' when not multi-arch */
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
+ XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr, sp)));
+#endif
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN = <0x%08lx>\n",
+ (long) current_gdbarch->deprecated_store_struct_return
+ /*DEPRECATED_STORE_STRUCT_RETURN ()*/);
+#endif
#ifdef DEPRECATED_USE_GENERIC_DUMMY_FRAMES
fprintf_unfiltered (file,
"gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES # %s\n",
@@ -2328,20 +2349,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->store_return_value
/*STORE_RETURN_VALUE ()*/);
#endif
-#ifdef STORE_STRUCT_RETURN
-#if GDB_MULTI_ARCH
- /* Macro might contain `[{}]' when not multi-arch */
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "STORE_STRUCT_RETURN(addr, sp)",
- XSTRING (STORE_STRUCT_RETURN (addr, sp)));
-#endif
- if (GDB_MULTI_ARCH)
- fprintf_unfiltered (file,
- "gdbarch_dump: STORE_STRUCT_RETURN = <0x%08lx>\n",
- (long) current_gdbarch->store_struct_return
- /*STORE_STRUCT_RETURN ()*/);
-#endif
#ifdef TARGET_ADDR_BIT
fprintf_unfiltered (file,
"gdbarch_dump: TARGET_ADDR_BIT # %s\n",
@@ -4309,23 +4316,30 @@ set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch,
gdbarch->deprecated_pop_frame = deprecated_pop_frame;
}
+int
+gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->deprecated_store_struct_return != 0;
+}
+
void
-gdbarch_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
+gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->store_struct_return == 0)
+ if (gdbarch->deprecated_store_struct_return == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_store_struct_return invalid");
+ "gdbarch: gdbarch_deprecated_store_struct_return invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_store_struct_return called\n");
- gdbarch->store_struct_return (addr, sp);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_struct_return called\n");
+ gdbarch->deprecated_store_struct_return (addr, sp);
}
void
-set_gdbarch_store_struct_return (struct gdbarch *gdbarch,
- gdbarch_store_struct_return_ftype store_struct_return)
+set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch,
+ gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return)
{
- gdbarch->store_struct_return = store_struct_return;
+ gdbarch->deprecated_store_struct_return = deprecated_store_struct_return;
}
void
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 563199f..422ea15 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -1757,15 +1757,42 @@ extern void set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch, gdbarch_d
#endif
#endif
-typedef void (gdbarch_store_struct_return_ftype) (CORE_ADDR addr, CORE_ADDR sp);
-extern void gdbarch_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp);
-extern void set_gdbarch_store_struct_return (struct gdbarch *gdbarch, gdbarch_store_struct_return_ftype *store_struct_return);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STORE_STRUCT_RETURN)
-#error "Non multi-arch definition of STORE_STRUCT_RETURN"
+/* NOTE: cagney/2003-03-24: Replaced by PUSH_ARGUMENTS. */
+
+#if defined (DEPRECATED_STORE_STRUCT_RETURN)
+/* Legacy for systems yet to multi-arch DEPRECATED_STORE_STRUCT_RETURN */
+#if !defined (DEPRECATED_STORE_STRUCT_RETURN_P)
+#define DEPRECATED_STORE_STRUCT_RETURN_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_STORE_STRUCT_RETURN_P)
+#define DEPRECATED_STORE_STRUCT_RETURN_P() (0)
+#endif
+
+extern int gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_STRUCT_RETURN_P)
+#error "Non multi-arch definition of DEPRECATED_STORE_STRUCT_RETURN"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_STORE_STRUCT_RETURN_P)
+#define DEPRECATED_STORE_STRUCT_RETURN_P() (gdbarch_deprecated_store_struct_return_p (current_gdbarch))
+#endif
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_STORE_STRUCT_RETURN)
+#define DEPRECATED_STORE_STRUCT_RETURN(addr, sp) (internal_error (__FILE__, __LINE__, "DEPRECATED_STORE_STRUCT_RETURN"), 0)
+#endif
+
+typedef void (gdbarch_deprecated_store_struct_return_ftype) (CORE_ADDR addr, CORE_ADDR sp);
+extern void gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp);
+extern void set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_STRUCT_RETURN)
+#error "Non multi-arch definition of DEPRECATED_STORE_STRUCT_RETURN"
#endif
#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STORE_STRUCT_RETURN)
-#define STORE_STRUCT_RETURN(addr, sp) (gdbarch_store_struct_return (current_gdbarch, addr, sp))
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_STORE_STRUCT_RETURN)
+#define DEPRECATED_STORE_STRUCT_RETURN(addr, sp) (gdbarch_deprecated_store_struct_return (current_gdbarch, addr, sp))
#endif
#endif
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 9d26534..84eaf57 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -559,8 +559,8 @@ f:2:PUSH_ARGUMENTS:CORE_ADDR:push_arguments:int nargs, struct value **args, CORE
F:2:DEPRECATED_PUSH_DUMMY_FRAME:void:deprecated_push_dummy_frame:void:-:::0
F:2:PUSH_RETURN_ADDRESS:CORE_ADDR:push_return_address:CORE_ADDR pc, CORE_ADDR sp:pc, sp:::0
F:2:DEPRECATED_POP_FRAME:void:deprecated_pop_frame:void:-:::0
-#
-f:2:STORE_STRUCT_RETURN:void:store_struct_return:CORE_ADDR addr, CORE_ADDR sp:addr, sp:::0
+# NOTE: cagney/2003-03-24: Replaced by PUSH_ARGUMENTS.
+F:2:DEPRECATED_STORE_STRUCT_RETURN:void:deprecated_store_struct_return:CORE_ADDR addr, CORE_ADDR sp:addr, sp:::0
#
f:2:EXTRACT_RETURN_VALUE:void:extract_return_value:struct type *type, struct regcache *regcache, void *valbuf:type, regcache, valbuf:::legacy_extract_return_value::0
f:2:STORE_RETURN_VALUE:void:store_return_value:struct type *type, struct regcache *regcache, const void *valbuf:type, regcache, valbuf:::legacy_store_return_value::0
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index 100cfde..dde14f9 100644
--- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c
@@ -1152,7 +1152,7 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_extract_return_value (gdbarch, h8300_extract_return_value);
set_gdbarch_push_arguments (gdbarch, h8300_push_arguments);
set_gdbarch_deprecated_pop_frame (gdbarch, h8300_pop_frame);
- set_gdbarch_store_struct_return (gdbarch, h8300_store_struct_return);
+ set_gdbarch_deprecated_store_struct_return (gdbarch, h8300_store_struct_return);
set_gdbarch_deprecated_store_return_value (gdbarch, h8300_store_return_value);
set_gdbarch_deprecated_extract_struct_value_address (gdbarch, h8300_extract_struct_value_address);
set_gdbarch_use_struct_convention (gdbarch, h8300_use_struct_convention);
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 3e94b2a..1ad9a5b 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -4983,7 +4983,7 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_max_register_raw_size (gdbarch, 4);
set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 8);
set_gdbarch_register_virtual_type (gdbarch, hppa_register_virtual_type);
- set_gdbarch_store_struct_return (gdbarch, hppa_store_struct_return);
+ set_gdbarch_deprecated_store_struct_return (gdbarch, hppa_store_struct_return);
set_gdbarch_deprecated_extract_return_value (gdbarch,
hppa_extract_return_value);
set_gdbarch_use_struct_convention (gdbarch, hppa_use_struct_convention);
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index ffdad06..02abc9e 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -1589,7 +1589,7 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_push_arguments (gdbarch, i386_push_arguments);
set_gdbarch_push_return_address (gdbarch, i386_push_return_address);
set_gdbarch_deprecated_pop_frame (gdbarch, i386_pop_frame);
- set_gdbarch_store_struct_return (gdbarch, i386_store_struct_return);
+ set_gdbarch_deprecated_store_struct_return (gdbarch, i386_store_struct_return);
set_gdbarch_store_return_value (gdbarch, i386_store_return_value);
set_gdbarch_extract_struct_value_address (gdbarch,
i386_extract_struct_value_address);
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index 9676782..1b3d765 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -96,7 +96,6 @@ 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_store_struct_return_ftype ia64_store_struct_return;
static gdbarch_push_arguments_ftype ia64_push_arguments;
static gdbarch_push_return_address_ftype ia64_push_return_address;
static gdbarch_saved_pc_after_call_ftype ia64_saved_pc_after_call;
@@ -2205,7 +2204,7 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_use_struct_convention (gdbarch, ia64_use_struct_convention);
set_gdbarch_deprecated_extract_return_value (gdbarch, ia64_extract_return_value);
- set_gdbarch_store_struct_return (gdbarch, ia64_store_struct_return);
+ set_gdbarch_deprecated_store_struct_return (gdbarch, ia64_store_struct_return);
set_gdbarch_deprecated_store_return_value (gdbarch, ia64_store_return_value);
set_gdbarch_deprecated_extract_struct_value_address (gdbarch, ia64_extract_struct_value_address);
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
index ec70601..436b3b3 100644
--- a/gdb/m68hc11-tdep.c
+++ b/gdb/m68hc11-tdep.c
@@ -1396,7 +1396,7 @@ m68hc11_gdbarch_init (struct gdbarch_info info,
set_gdbarch_push_return_address (gdbarch, m68hc11_push_return_address);
set_gdbarch_return_value_on_stack (gdbarch, m68hc11_return_value_on_stack);
- set_gdbarch_store_struct_return (gdbarch, m68hc11_store_struct_return);
+ set_gdbarch_deprecated_store_struct_return (gdbarch, m68hc11_store_struct_return);
set_gdbarch_deprecated_store_return_value (gdbarch, m68hc11_store_return_value);
set_gdbarch_deprecated_extract_struct_value_address (gdbarch, m68hc11_extract_struct_value_address);
set_gdbarch_register_convertible (gdbarch, generic_register_convertible_not);
@@ -1411,7 +1411,7 @@ m68hc11_gdbarch_init (struct gdbarch_info info,
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_struct_return (gdbarch, m68hc11_store_struct_return);
set_gdbarch_deprecated_store_return_value (gdbarch, m68hc11_store_return_value);
set_gdbarch_deprecated_extract_struct_value_address
(gdbarch, m68hc11_extract_struct_value_address);
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index 41b09ab..2e359fb 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -1005,7 +1005,7 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
set_gdbarch_decr_pc_after_break (gdbarch, 2);
- set_gdbarch_store_struct_return (gdbarch, m68k_store_struct_return);
+ set_gdbarch_deprecated_store_struct_return (gdbarch, m68k_store_struct_return);
set_gdbarch_deprecated_extract_return_value (gdbarch,
m68k_deprecated_extract_return_value);
set_gdbarch_deprecated_store_return_value (gdbarch, m68k_store_return_value);
diff --git a/gdb/mcore-tdep.c b/gdb/mcore-tdep.c
index c0373c4..e3070b3 100644
--- a/gdb/mcore-tdep.c
+++ b/gdb/mcore-tdep.c
@@ -1142,7 +1142,7 @@ mcore_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_store_return_value (gdbarch, mcore_store_return_value);
set_gdbarch_deprecated_extract_return_value (gdbarch,
mcore_extract_return_value);
- set_gdbarch_store_struct_return (gdbarch, mcore_store_struct_return);
+ set_gdbarch_deprecated_store_struct_return (gdbarch, mcore_store_struct_return);
set_gdbarch_deprecated_extract_struct_value_address (gdbarch,
mcore_extract_struct_value_address);
set_gdbarch_skip_prologue (gdbarch, mcore_skip_prologue);
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 8be888a..2a63d22 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -6079,7 +6079,7 @@ mips_gdbarch_init (struct gdbarch_info info,
/* Hook in OS ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch);
- set_gdbarch_store_struct_return (gdbarch, mips_store_struct_return);
+ set_gdbarch_deprecated_store_struct_return (gdbarch, mips_store_struct_return);
set_gdbarch_extract_struct_value_address (gdbarch,
mips_extract_struct_value_address);
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c
index ab01cd4..087c9df 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -1176,7 +1176,7 @@ mn10300_gdbarch_init (struct gdbarch_info info,
set_gdbarch_deprecated_extract_struct_value_address
(gdbarch, mn10300_extract_struct_value_address);
set_gdbarch_deprecated_store_return_value (gdbarch, mn10300_store_return_value);
- set_gdbarch_store_struct_return (gdbarch, mn10300_store_struct_return);
+ set_gdbarch_deprecated_store_struct_return (gdbarch, mn10300_store_struct_return);
set_gdbarch_deprecated_pop_frame (gdbarch, mn10300_pop_frame);
set_gdbarch_skip_prologue (gdbarch, mn10300_skip_prologue);
set_gdbarch_frame_args_skip (gdbarch, 0);
diff --git a/gdb/ns32k-tdep.c b/gdb/ns32k-tdep.c
index 1a620de..323cade 100644
--- a/gdb/ns32k-tdep.c
+++ b/gdb/ns32k-tdep.c
@@ -585,7 +585,7 @@ ns32k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
/* Return value info */
- set_gdbarch_store_struct_return (gdbarch, ns32k_store_struct_return);
+ set_gdbarch_deprecated_store_struct_return (gdbarch, ns32k_store_struct_return);
set_gdbarch_deprecated_extract_return_value (gdbarch, ns32k_extract_return_value);
set_gdbarch_deprecated_store_return_value (gdbarch, ns32k_store_return_value);
set_gdbarch_deprecated_extract_struct_value_address (gdbarch,
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 7824a2c..539905e 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -2928,7 +2928,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
else
set_gdbarch_push_arguments (gdbarch, rs6000_push_arguments);
- set_gdbarch_store_struct_return (gdbarch, rs6000_store_struct_return);
+ set_gdbarch_deprecated_store_struct_return (gdbarch, rs6000_store_struct_return);
set_gdbarch_extract_struct_value_address (gdbarch, rs6000_extract_struct_value_address);
set_gdbarch_deprecated_pop_frame (gdbarch, rs6000_pop_frame);
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index 578e3cd..18b7d10 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -1813,7 +1813,7 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frame_locals_address (gdbarch, s390_frame_args_address);
/* 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_deprecated_store_struct_return (gdbarch, s390_store_struct_return);
set_gdbarch_deprecated_extract_return_value (gdbarch, s390_extract_return_value);
set_gdbarch_deprecated_store_return_value (gdbarch, s390_store_return_value);
/* Amount PC must be decremented by after a breakpoint.
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index 5e93c56..7649c62 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -4376,7 +4376,7 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
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_store_struct_return (gdbarch, sh_store_struct_return);
+ set_gdbarch_deprecated_store_struct_return (gdbarch, sh_store_struct_return);
set_gdbarch_use_struct_convention (gdbarch, sh_use_struct_convention);
set_gdbarch_deprecated_extract_struct_value_address (gdbarch, sh_extract_struct_value_address);
set_gdbarch_deprecated_pop_frame (gdbarch, sh_pop_frame);
@@ -4618,7 +4618,7 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
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_store_struct_return (gdbarch, sh64_store_struct_return);*/
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_deprecated_pop_frame (gdbarch, sh64_pop_frame);
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index bef029b..476616b 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -3275,7 +3275,7 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
#endif
set_gdbarch_stack_align (gdbarch, sparc32_stack_align);
- set_gdbarch_store_struct_return (gdbarch, sparc32_store_struct_return);
+ set_gdbarch_deprecated_store_struct_return (gdbarch, sparc32_store_struct_return);
set_gdbarch_use_struct_convention (gdbarch,
generic_use_struct_convention);
set_gdbarch_write_sp (gdbarch, generic_target_write_sp);
@@ -3332,7 +3332,7 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
#endif
set_gdbarch_stack_align (gdbarch, sparc64_stack_align);
- set_gdbarch_store_struct_return (gdbarch, sparc64_store_struct_return);
+ set_gdbarch_deprecated_store_struct_return (gdbarch, sparc64_store_struct_return);
set_gdbarch_use_struct_convention (gdbarch,
sparc64_use_struct_convention);
set_gdbarch_write_sp (gdbarch, sparc64_write_sp);
diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c
index ede5abc..f7d34c8 100644
--- a/gdb/v850-tdep.c
+++ b/gdb/v850-tdep.c
@@ -1272,7 +1272,7 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_extract_return_value (gdbarch, v850_extract_return_value);
set_gdbarch_push_arguments (gdbarch, v850_push_arguments);
set_gdbarch_deprecated_pop_frame (gdbarch, v850_pop_frame);
- set_gdbarch_store_struct_return (gdbarch, v850_store_struct_return);
+ set_gdbarch_deprecated_store_struct_return (gdbarch, v850_store_struct_return);
set_gdbarch_deprecated_store_return_value (gdbarch, v850_store_return_value);
set_gdbarch_deprecated_extract_struct_value_address (gdbarch, v850_extract_struct_value_address);
set_gdbarch_use_struct_convention (gdbarch, v850_use_struct_convention);
diff --git a/gdb/valops.c b/gdb/valops.c
index 90ad7ba..f6c83ac 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -1654,16 +1654,11 @@ You must use a pointer to function type variable. Command ignored.", arg_name);
}
/* Store the address at which the structure is supposed to be
- written. Note that this (and the code which reserved the space
- above) assumes that gcc was used to compile this function. Since
- it doesn't cost us anything but space and if the function is pcc
- it will ignore this value, we will make that assumption.
-
- Also note that on some machines (like the sparc) pcc uses a
- convention like gcc's. */
-
- if (struct_return)
- STORE_STRUCT_RETURN (struct_addr, sp);
+ written. */
+ /* NOTE: 2003-03-24: Since PUSH_ARGUMENTS can (and typically does)
+ store the struct return address, this call is entirely redundant. */
+ if (struct_return && DEPRECATED_STORE_STRUCT_RETURN_P ())
+ DEPRECATED_STORE_STRUCT_RETURN (struct_addr, sp);
/* Write the stack pointer. This is here because the statements above
might fool with it. On SPARC, this write also stores the register
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index bd075de..d2ac421 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -46,7 +46,6 @@ static gdbarch_deprecated_frame_chain_ftype vax_frame_chain;
static gdbarch_frame_args_address_ftype vax_frame_args_address;
static gdbarch_frame_locals_address_ftype vax_frame_locals_address;
-static gdbarch_store_struct_return_ftype vax_store_struct_return;
static gdbarch_deprecated_extract_return_value_ftype vax_extract_return_value;
static gdbarch_deprecated_extract_struct_value_address_ftype
vax_extract_struct_value_address;
@@ -660,7 +659,7 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
/* Return value info */
- set_gdbarch_store_struct_return (gdbarch, vax_store_struct_return);
+ set_gdbarch_deprecated_store_struct_return (gdbarch, vax_store_struct_return);
set_gdbarch_deprecated_extract_return_value (gdbarch, vax_extract_return_value);
set_gdbarch_deprecated_store_return_value (gdbarch, vax_store_return_value);
set_gdbarch_deprecated_extract_struct_value_address (gdbarch, vax_extract_struct_value_address);
diff --git a/gdb/x86-64-tdep.c b/gdb/x86-64-tdep.c
index b29ffe6..321d9c3 100644
--- a/gdb/x86-64-tdep.c
+++ b/gdb/x86-64-tdep.c
@@ -1016,7 +1016,7 @@ x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_push_arguments (gdbarch, x86_64_push_arguments);
set_gdbarch_push_return_address (gdbarch, x86_64_push_return_address);
set_gdbarch_deprecated_pop_frame (gdbarch, x86_64_pop_frame);
- set_gdbarch_store_struct_return (gdbarch, x86_64_store_struct_return);
+ set_gdbarch_deprecated_store_struct_return (gdbarch, x86_64_store_struct_return);
set_gdbarch_store_return_value (gdbarch, x86_64_store_return_value);
/* Override, since this is handled by x86_64_extract_return_value. */
set_gdbarch_extract_struct_value_address (gdbarch, NULL);
diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c
index 47c80fe..5cce019 100644
--- a/gdb/xstormy16-tdep.c
+++ b/gdb/xstormy16-tdep.c
@@ -1088,7 +1088,7 @@ xstormy16_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_extract_return_value (gdbarch, xstormy16_extract_return_value);
set_gdbarch_push_arguments (gdbarch, xstormy16_push_arguments);
set_gdbarch_deprecated_pop_frame (gdbarch, xstormy16_pop_frame);
- set_gdbarch_store_struct_return (gdbarch, xstormy16_store_struct_return);
+ set_gdbarch_deprecated_store_struct_return (gdbarch, xstormy16_store_struct_return);
set_gdbarch_deprecated_store_return_value (gdbarch, xstormy16_store_return_value);
set_gdbarch_deprecated_extract_struct_value_address (gdbarch, xstormy16_extract_struct_value_address);
set_gdbarch_use_struct_convention (gdbarch,