This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit] Eliminate generic_cannot_extract_struct_value_address
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Fri, 31 Oct 2003 17:18:11 -0500
- Subject: [commit] Eliminate generic_cannot_extract_struct_value_address
FYI,
Minor cleanup. Only one architecture used it and it is now out-of-date.
committed,
Andrew
2003-10-31 Andrew Cagney <cagney@redhat.com>
* s390-tdep.c (s390_cannot_extract_struct_value_address): New
function.
(s390_gdbarch_init): Set extract_struct_value_address.
* arch-utils.c (generic_cannot_extract_struct_value_address):
Delete function.
* arch-utils.h (generic_cannot_extract_struct_value_address):
Delete definition.
Index: arch-utils.c
===================================================================
RCS file: /cvs/src/src/gdb/arch-utils.c,v
retrieving revision 1.100
diff -u -r1.100 arch-utils.c
--- arch-utils.c 27 Oct 2003 20:47:26 -0000 1.100
+++ arch-utils.c 31 Oct 2003 22:14:30 -0000
@@ -200,21 +200,6 @@
}
-/* Under some ABI's that specify the `struct convention' for returning
- structures by value, by the time we've returned from the function,
- the return value is sitting there in the caller's buffer, but GDB
- has no way to find the address of that buffer.
-
- On such architectures, use this function as your
- extract_struct_value_address method. When asked to a struct
- returned by value in this fashion, GDB will print a nice error
- message, instead of garbage. */
-CORE_ADDR
-generic_cannot_extract_struct_value_address (char *dummy)
-{
- return 0;
-}
-
CORE_ADDR
core_addr_identity (CORE_ADDR addr)
{
Index: s390-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/s390-tdep.c,v
retrieving revision 1.117
diff -u -r1.117 s390-tdep.c
--- s390-tdep.c 2 Oct 2003 20:28:30 -0000 1.117
+++ s390-tdep.c 31 Oct 2003 22:14:31 -0000
@@ -1874,6 +1874,15 @@
+/* NOTE: cagney/2003-10-31: "return_value" makes
+ "extract_struct_value_address", "extract_return_value", and
+ "use_struct_convention" redundant. */
+static CORE_ADDR
+s390_cannot_extract_struct_value_address (struct regcache *regcache)
+{
+ return 0;
+}
+
/* a given return value in `regbuf' with a type `valtype', extract and copy its
value into `valbuf' */
static void
@@ -2622,8 +2631,7 @@
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_deprecated_extract_struct_value_address
- (gdbarch, generic_cannot_extract_struct_value_address);
+ set_gdbarch_extract_struct_value_address (gdbarch, s390_cannot_extract_struct_value_address);
/* Parameters for inferior function calls. */
set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);