From 444a1e2eb8c412b0e945b1521b9b2c0bbcd5f767 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Sat, 17 Jan 2004 20:17:40 +0000 Subject: [PATCH] 2004-01-17 Andrew Cagney * gdbarch.sh (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS): Delete. * gdbarch.h, gdbarch.c: Re-generate. * infcmd.c (print_return_value): Delete reference to DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS. --- gdb/ChangeLog | 5 +++++ gdb/gdbarch.c | 46 ---------------------------------------------- gdb/gdbarch.h | 25 ------------------------- gdb/gdbarch.sh | 1 - gdb/infcmd.c | 8 -------- 5 files changed, 5 insertions(+), 80 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6c2c4d6c778..586830b74ad 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2004-01-17 Andrew Cagney + * gdbarch.sh (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS): Delete. + * gdbarch.h, gdbarch.c: Re-generate. + * infcmd.c (print_return_value): Delete reference to + DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS. + * cris-tdep.c (cris_gdbarch_init): Do not set deprecated_extract_struct_value_address. diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index ff32f772761..f950bfc2b50 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -207,7 +207,6 @@ struct gdbarch gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value; gdbarch_use_struct_convention_ftype *use_struct_convention; gdbarch_extract_struct_value_address_ftype *extract_struct_value_address; - gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address; gdbarch_deprecated_frame_init_saved_regs_ftype *deprecated_frame_init_saved_regs; gdbarch_deprecated_init_extra_frame_info_ftype *deprecated_init_extra_frame_info; gdbarch_skip_prologue_ftype *skip_prologue; @@ -379,7 +378,6 @@ struct gdbarch startup_gdbarch = 0, /* deprecated_store_return_value */ 0, /* use_struct_convention */ 0, /* extract_struct_value_address */ - 0, /* deprecated_extract_struct_value_address */ 0, /* deprecated_frame_init_saved_regs */ 0, /* deprecated_init_extra_frame_info */ 0, /* skip_prologue */ @@ -687,7 +685,6 @@ verify_gdbarch (struct gdbarch *current_gdbarch) /* Skip verify of store_return_value, invalid_p == 0 */ /* Skip verify of use_struct_convention, invalid_p == 0 */ /* Skip verify of extract_struct_value_address, has predicate */ - /* Skip verify of deprecated_extract_struct_value_address, has predicate */ /* Skip verify of deprecated_frame_init_saved_regs, has predicate */ /* Skip verify of deprecated_init_extra_frame_info, has predicate */ if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) @@ -1088,25 +1085,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file) (long) current_gdbarch->deprecated_extract_return_value /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/); #endif -#ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()", - XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ())); - fprintf_unfiltered (file, - "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n", - DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()); -#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))); - 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 DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED fprintf_unfiltered (file, "gdbarch_dump: DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED # %s\n", @@ -4389,30 +4367,6 @@ set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, gdbarch->extract_struct_value_address = extract_struct_value_address; } -int -gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch) -{ - gdb_assert (gdbarch != NULL); - return gdbarch->deprecated_extract_struct_value_address != NULL; -} - -CORE_ADDR -gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf) -{ - gdb_assert (gdbarch != NULL); - gdb_assert (gdbarch->deprecated_extract_struct_value_address != NULL); - if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n"); - return gdbarch->deprecated_extract_struct_value_address (regbuf); -} - -void -set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, - gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address) -{ - gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address; -} - int gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch) { diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 83ac8ee2b2d..deb97ae2059 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -1536,31 +1536,6 @@ extern void set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, g #define EXTRACT_STRUCT_VALUE_ADDRESS(regcache) (gdbarch_extract_struct_value_address (current_gdbarch, regcache)) #endif -#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 - -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 (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P) -#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (gdbarch_deprecated_extract_struct_value_address_p (current_gdbarch)) -#endif - -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 !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS) -#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (gdbarch_deprecated_extract_struct_value_address (current_gdbarch, regbuf)) -#endif - #if defined (DEPRECATED_FRAME_INIT_SAVED_REGS) /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_INIT_SAVED_REGS */ #if !defined (DEPRECATED_FRAME_INIT_SAVED_REGS_P) diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 1920341ccc7..31f20c66f78 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -617,7 +617,6 @@ f:2:DEPRECATED_STORE_RETURN_VALUE:void:deprecated_store_return_value:struct type 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:EXTRACT_STRUCT_VALUE_ADDRESS:CORE_ADDR:extract_struct_value_address:struct regcache *regcache:regcache -F:2:DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS:CORE_ADDR:deprecated_extract_struct_value_address:char *regbuf:regbuf # F:2:DEPRECATED_FRAME_INIT_SAVED_REGS:void:deprecated_frame_init_saved_regs:struct frame_info *frame:frame F:2:DEPRECATED_INIT_EXTRA_FRAME_INFO:void:deprecated_init_extra_frame_info:int fromleaf, struct frame_info *frame:fromleaf, frame diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 2c8631eb3ba..d4510e48401 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -1109,14 +1109,6 @@ print_return_value (int structure_return, struct type *value_type) error ("Function return value unknown."); value = value_at (value_type, addr, NULL); } - else if (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()) - { - char *buf = deprecated_grub_regcache_for_registers (stop_registers); - CORE_ADDR addr = DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (buf); - if (!addr) - error ("Function return value unknown."); - value = value_at (value_type, addr, NULL); - } else { /* It is "struct return" yet the value is being extracted, -- 2.30.2