This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] Remove deprecated_store_struct_return gdbarch routine
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 9 May 2007 02:18:54 +0200 (CEST)
- Subject: [commit] Remove deprecated_store_struct_return gdbarch routine
Hello,
the deprecated_store_struct_return gdbarch routine has been superseded
by push_dummy_call; it is no longer called anywhere; and only frv-tdep.c
still defines an instance (frv-tdep also handled this in push_dummy_call).
Thus this patch removes the obsolete gdbarch routine.
Committed to mainline.
Bye,
Ulrich
ChangeLog:
* gdbarch.sh (deprecated_store_struct_return): Remove.
* gdbarch.c, gdbarch.h: Regenerate.
* frv-tdep.c (frv_store_struct_return): Remove.
(frv_gdbarch_init): Do not install it.
diff -urNp gdb-orig/gdb/frv-tdep.c gdb-head/gdb/frv-tdep.c
--- gdb-orig/gdb/frv-tdep.c 2007-05-06 22:20:35.000000000 +0200
+++ gdb-head/gdb/frv-tdep.c 2007-05-09 02:01:18.380744400 +0200
@@ -1054,12 +1054,6 @@ frv_extract_struct_value_address (struct
return addr;
}
-static void
-frv_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
-{
- write_register (struct_return_regnum, addr);
-}
-
static CORE_ADDR
frv_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
{
@@ -1504,7 +1498,6 @@ frv_gdbarch_init (struct gdbarch_info in
set_gdbarch_deprecated_use_struct_convention (gdbarch, always_use_struct_convention);
set_gdbarch_extract_return_value (gdbarch, frv_extract_return_value);
- set_gdbarch_deprecated_store_struct_return (gdbarch, frv_store_struct_return);
set_gdbarch_store_return_value (gdbarch, frv_store_return_value);
set_gdbarch_deprecated_extract_struct_value_address (gdbarch, frv_extract_struct_value_address);
diff -urNp gdb-orig/gdb/gdbarch.c gdb-head/gdb/gdbarch.c
--- gdb-orig/gdb/gdbarch.c 2007-05-08 14:37:40.000000000 +0200
+++ gdb-head/gdb/gdbarch.c 2007-05-09 02:01:18.407740519 +0200
@@ -187,7 +187,6 @@ struct gdbarch
gdbarch_pointer_to_address_ftype *pointer_to_address;
gdbarch_address_to_pointer_ftype *address_to_pointer;
gdbarch_integer_to_address_ftype *integer_to_address;
- gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return;
gdbarch_return_value_ftype *return_value;
gdbarch_extract_return_value_ftype *extract_return_value;
gdbarch_store_return_value_ftype *store_return_value;
@@ -315,7 +314,6 @@ struct gdbarch startup_gdbarch =
0, /* pointer_to_address */
0, /* address_to_pointer */
0, /* integer_to_address */
- 0, /* deprecated_store_struct_return */
0, /* return_value */
0, /* extract_return_value */
0, /* store_return_value */
@@ -569,7 +567,6 @@ verify_gdbarch (struct gdbarch *current_
/* Skip verify of pointer_to_address, invalid_p == 0 */
/* Skip verify of address_to_pointer, invalid_p == 0 */
/* Skip verify of integer_to_address, has predicate */
- /* Skip verify of deprecated_store_struct_return, has predicate */
/* Skip verify of return_value, has predicate */
/* Skip verify of deprecated_use_struct_convention, invalid_p == 0 */
/* Skip verify of deprecated_extract_struct_value_address, has predicate */
@@ -918,24 +915,6 @@ gdbarch_dump (struct gdbarch *current_gd
fprintf_unfiltered (file,
"gdbarch_dump: deprecated_stack_align = <0x%lx>\n",
(long) current_gdbarch->deprecated_stack_align);
-#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 ()));
-#endif
- fprintf_unfiltered (file,
- "gdbarch_dump: gdbarch_deprecated_store_struct_return_p() = %d\n",
- gdbarch_deprecated_store_struct_return_p (current_gdbarch));
-#ifdef DEPRECATED_STORE_STRUCT_RETURN
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
- XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr, sp)));
-#endif
- fprintf_unfiltered (file,
- "gdbarch_dump: deprecated_store_struct_return = <0x%lx>\n",
- (long) current_gdbarch->deprecated_store_struct_return);
#ifdef DEPRECATED_USE_STRUCT_CONVENTION
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -2675,30 +2654,6 @@ set_gdbarch_integer_to_address (struct g
}
int
-gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_store_struct_return != NULL;
-}
-
-void
-gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->deprecated_store_struct_return != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_struct_return called\n");
- gdbarch->deprecated_store_struct_return (addr, sp);
-}
-
-void
-set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch,
- gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return)
-{
- gdbarch->deprecated_store_struct_return = deprecated_store_struct_return;
-}
-
-int
gdbarch_return_value_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
diff -urNp gdb-orig/gdb/gdbarch.h gdb-head/gdb/gdbarch.h
--- gdb-orig/gdb/gdbarch.h 2007-05-08 14:37:40.000000000 +0200
+++ gdb-head/gdb/gdbarch.h 2007-05-09 02:01:18.429737357 +0200
@@ -710,33 +710,6 @@ typedef CORE_ADDR (gdbarch_integer_to_ad
extern CORE_ADDR gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf);
extern void set_gdbarch_integer_to_address (struct gdbarch *gdbarch, gdbarch_integer_to_address_ftype *integer_to_address);
-/* NOTE: kettenis/2005-09-01: Replaced by PUSH_DUMMY_CALL. */
-
-#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
-
-extern int gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch);
-#if !defined (GDB_TM_FILE) && defined (DEPRECATED_STORE_STRUCT_RETURN_P)
-#error "Non multi-arch definition of DEPRECATED_STORE_STRUCT_RETURN"
-#endif
-#if !defined (DEPRECATED_STORE_STRUCT_RETURN_P)
-#define DEPRECATED_STORE_STRUCT_RETURN_P() (gdbarch_deprecated_store_struct_return_p (current_gdbarch))
-#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 !defined (GDB_TM_FILE) && defined (DEPRECATED_STORE_STRUCT_RETURN)
-#error "Non multi-arch definition of DEPRECATED_STORE_STRUCT_RETURN"
-#endif
-#if !defined (DEPRECATED_STORE_STRUCT_RETURN)
-#define DEPRECATED_STORE_STRUCT_RETURN(addr, sp) (gdbarch_deprecated_store_struct_return (current_gdbarch, addr, sp))
-#endif
-
/* It has been suggested that this, well actually its predecessor,
should take the type/value of the function to be called and not the
return type. This is left as an exercise for the reader.
diff -urNp gdb-orig/gdb/gdbarch.sh gdb-head/gdb/gdbarch.sh
--- gdb-orig/gdb/gdbarch.sh 2007-05-08 14:37:40.000000000 +0200
+++ gdb-head/gdb/gdbarch.sh 2007-05-09 02:01:18.450734338 +0200
@@ -501,9 +501,6 @@ f::struct value *:value_from_register:st
f:=:CORE_ADDR:pointer_to_address:struct type *type, const gdb_byte *buf:type, buf::unsigned_pointer_to_address::0
f:=:void:address_to_pointer:struct type *type, gdb_byte *buf, CORE_ADDR addr:type, buf, addr::unsigned_address_to_pointer::0
M::CORE_ADDR:integer_to_address:struct type *type, const gdb_byte *buf:type, buf
-#
-# NOTE: kettenis/2005-09-01: Replaced by PUSH_DUMMY_CALL.
-F:=:void:deprecated_store_struct_return:CORE_ADDR addr, CORE_ADDR sp:addr, sp
# It has been suggested that this, well actually its predecessor,
# should take the type/value of the function to be called and not the
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com