diff options
author | Mark Kettenis <kettenis@gnu.org> | 2007-01-13 23:24:43 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2007-01-13 23:24:43 +0000 |
commit | 5e66aab290c982e10723e2c38303f1a6d2ea0a35 (patch) | |
tree | faadd8b8b3a0ceba6296a5f1d6a1c6bee9e41f5d /gdb | |
parent | 08f9ce9edc64c89c7d40439472d618922f8578c0 (diff) | |
download | gdb-5e66aab290c982e10723e2c38303f1a6d2ea0a35.zip gdb-5e66aab290c982e10723e2c38303f1a6d2ea0a35.tar.gz gdb-5e66aab290c982e10723e2c38303f1a6d2ea0a35.tar.bz2 |
* gdbarch.sh (deprecated_extract_return_value)
(deprecated_store_return_value): Remove.
(extract_return_value, store_return_value): Remove default values.
* gdbarch.c, gdbarch.h: Regenerate.
* arch-utils.c, arch-utils.h (legacy_extract_return_value)
(legacy_store_return_value): Remove.
* regcache.c, regcache.h (deprecated_grub_regcache_for_registers):
Remove.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 9 | ||||
-rw-r--r-- | gdb/arch-utils.c | 34 | ||||
-rw-r--r-- | gdb/arch-utils.h | 7 | ||||
-rw-r--r-- | gdb/gdbarch.c | 60 | ||||
-rw-r--r-- | gdb/gdbarch.h | 20 | ||||
-rwxr-xr-x | gdb/gdbarch.sh | 6 | ||||
-rw-r--r-- | gdb/regcache.c | 6 | ||||
-rw-r--r-- | gdb/regcache.h | 1 |
8 files changed, 11 insertions, 132 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 415240c..0eacbc3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,14 @@ 2007-01-13 Mark Kettenis <kettenis@gnu.org> + * gdbarch.sh (deprecated_extract_return_value) + (deprecated_store_return_value): Remove. + (extract_return_value, store_return_value): Remove default values. + * gdbarch.c, gdbarch.h: Regenerate. + * arch-utils.c, arch-utils.h (legacy_extract_return_value) + (legacy_store_return_value): Remove. + * regcache.c, regcache.h (deprecated_grub_regcache_for_registers): + Remove. + * mi/mi-main.c: Remove obsolete comment. * regcache.c, regcache.h (deprecated_register_bytes) diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index 3635955..bd8abea 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -38,29 +38,6 @@ #include "floatformat.h" -/* Implementation of extract return value that grubs around in the - register cache. */ -void -legacy_extract_return_value (struct type *type, struct regcache *regcache, - gdb_byte *valbuf) -{ - gdb_byte *registers = deprecated_grub_regcache_for_registers (regcache); - gdb_byte *buf = valbuf; - DEPRECATED_EXTRACT_RETURN_VALUE (type, registers, buf); /* OK */ -} - -/* Implementation of store return value that grubs the register cache. - Takes a local copy of the buffer to avoid const problems. */ -void -legacy_store_return_value (struct type *type, struct regcache *regcache, - const gdb_byte *buf) -{ - gdb_byte *b = alloca (TYPE_LENGTH (type)); - gdb_assert (regcache == current_regcache); - memcpy (b, buf, TYPE_LENGTH (type)); - DEPRECATED_STORE_RETURN_VALUE (type, b); -} - int always_use_struct_convention (int gcc_p, struct type *value_type) { @@ -312,17 +289,6 @@ generic_convert_register_p (int regnum, struct type *type) int default_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type) { - if (DEPRECATED_REG_STRUCT_HAS_ADDR_P () - && DEPRECATED_REG_STRUCT_HAS_ADDR (processing_gcc_compilation, type)) - { - CHECK_TYPEDEF (type); - - return (TYPE_CODE (type) == TYPE_CODE_STRUCT - || TYPE_CODE (type) == TYPE_CODE_UNION - || TYPE_CODE (type) == TYPE_CODE_SET - || TYPE_CODE (type) == TYPE_CODE_BITSTRING); - } - return 0; } diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h index c114c06..f1cdb3c 100644 --- a/gdb/arch-utils.h +++ b/gdb/arch-utils.h @@ -41,13 +41,6 @@ enum return_value_convention legacy_return_value (struct gdbarch *gdbarch, gdb_byte *readbuf, const gdb_byte *writebuf); -/* Implementation of extract return value that grubs around in the - register cache. */ -extern gdbarch_extract_return_value_ftype legacy_extract_return_value; - -/* Implementation of store return value that grubs the register cache. */ -extern gdbarch_store_return_value_ftype legacy_store_return_value; - /* To return any structure or union type by value, store it at the address passed as an invisible first argument to the function. */ extern gdbarch_deprecated_use_struct_convention_ftype always_use_struct_convention; diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 98efb67..decc8e0 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -191,8 +191,6 @@ struct gdbarch gdbarch_return_value_ftype *return_value; 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; - gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value; gdbarch_deprecated_use_struct_convention_ftype *deprecated_use_struct_convention; gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address; gdbarch_skip_prologue_ftype *skip_prologue; @@ -320,8 +318,6 @@ struct gdbarch startup_gdbarch = 0, /* return_value */ 0, /* extract_return_value */ 0, /* store_return_value */ - 0, /* deprecated_extract_return_value */ - 0, /* deprecated_store_return_value */ 0, /* deprecated_use_struct_convention */ 0, /* deprecated_extract_struct_value_address */ 0, /* skip_prologue */ @@ -439,8 +435,6 @@ gdbarch_alloc (const struct gdbarch_info *info, current_gdbarch->pointer_to_address = unsigned_pointer_to_address; current_gdbarch->address_to_pointer = unsigned_address_to_pointer; current_gdbarch->return_value = legacy_return_value; - current_gdbarch->extract_return_value = legacy_extract_return_value; - current_gdbarch->store_return_value = legacy_store_return_value; current_gdbarch->deprecated_use_struct_convention = generic_use_struct_convention; current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint; current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint; @@ -575,8 +569,6 @@ verify_gdbarch (struct gdbarch *current_gdbarch) /* 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 extract_return_value, invalid_p == 0 */ - /* Skip verify of store_return_value, invalid_p == 0 */ /* Skip verify of deprecated_use_struct_convention, invalid_p == 0 */ /* Skip verify of deprecated_extract_struct_value_address, has predicate */ if (current_gdbarch->skip_prologue == 0) @@ -844,15 +836,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file) fprintf_unfiltered (file, "gdbarch_dump: decr_pc_after_break = 0x%s\n", paddr_nz (current_gdbarch->decr_pc_after_break)); -#ifdef DEPRECATED_EXTRACT_RETURN_VALUE - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)", - XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf))); -#endif - fprintf_unfiltered (file, - "gdbarch_dump: deprecated_extract_return_value = <0x%lx>\n", - (long) current_gdbarch->deprecated_extract_return_value); #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P fprintf_unfiltered (file, "gdbarch_dump: %s # %s\n", @@ -949,15 +932,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file) fprintf_unfiltered (file, "gdbarch_dump: deprecated_stack_align = <0x%lx>\n", (long) current_gdbarch->deprecated_stack_align); -#ifdef DEPRECATED_STORE_RETURN_VALUE - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)", - XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf))); -#endif - fprintf_unfiltered (file, - "gdbarch_dump: deprecated_store_return_value = <0x%lx>\n", - (long) current_gdbarch->deprecated_store_return_value); #ifdef DEPRECATED_STORE_STRUCT_RETURN_P fprintf_unfiltered (file, "gdbarch_dump: %s # %s\n", @@ -2813,40 +2787,6 @@ set_gdbarch_store_return_value (struct gdbarch *gdbarch, gdbarch->store_return_value = store_return_value; } -void -gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, gdb_byte *regbuf, gdb_byte *valbuf) -{ - gdb_assert (gdbarch != NULL); - gdb_assert (gdbarch->deprecated_extract_return_value != NULL); - if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n"); - gdbarch->deprecated_extract_return_value (type, regbuf, valbuf); -} - -void -set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, - gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value) -{ - gdbarch->deprecated_extract_return_value = deprecated_extract_return_value; -} - -void -gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, gdb_byte *valbuf) -{ - gdb_assert (gdbarch != NULL); - gdb_assert (gdbarch->deprecated_store_return_value != NULL); - if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n"); - gdbarch->deprecated_store_return_value (type, valbuf); -} - -void -set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, - gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value) -{ - gdbarch->deprecated_store_return_value = deprecated_store_return_value; -} - int gdbarch_deprecated_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type) { diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 6fcc72d..56bf313 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -804,26 +804,6 @@ extern void set_gdbarch_store_return_value (struct gdbarch *gdbarch, gdbarch_sto #define STORE_RETURN_VALUE(type, regcache, valbuf) (gdbarch_store_return_value (current_gdbarch, type, regcache, valbuf)) #endif -typedef void (gdbarch_deprecated_extract_return_value_ftype) (struct type *type, gdb_byte *regbuf, gdb_byte *valbuf); -extern void gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, gdb_byte *regbuf, gdb_byte *valbuf); -extern void set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value); -#if !defined (GDB_TM_FILE) && defined (DEPRECATED_EXTRACT_RETURN_VALUE) -#error "Non multi-arch definition of DEPRECATED_EXTRACT_RETURN_VALUE" -#endif -#if !defined (DEPRECATED_EXTRACT_RETURN_VALUE) -#define DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf) (gdbarch_deprecated_extract_return_value (current_gdbarch, type, regbuf, valbuf)) -#endif - -typedef void (gdbarch_deprecated_store_return_value_ftype) (struct type *type, gdb_byte *valbuf); -extern void gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, gdb_byte *valbuf); -extern void set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value); -#if !defined (GDB_TM_FILE) && defined (DEPRECATED_STORE_RETURN_VALUE) -#error "Non multi-arch definition of DEPRECATED_STORE_RETURN_VALUE" -#endif -#if !defined (DEPRECATED_STORE_RETURN_VALUE) -#define DEPRECATED_STORE_RETURN_VALUE(type, valbuf) (gdbarch_deprecated_store_return_value (current_gdbarch, type, valbuf)) -#endif - typedef int (gdbarch_deprecated_use_struct_convention_ftype) (int gcc_p, struct type *value_type); extern int gdbarch_deprecated_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type); extern void set_gdbarch_deprecated_use_struct_convention (struct gdbarch *gdbarch, gdbarch_deprecated_use_struct_convention_ftype *deprecated_use_struct_convention); diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 2efd925..ee616e3 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -524,10 +524,8 @@ M::enum return_value_convention:return_value:struct type *valtype, struct regcac # DEPRECATED_USE_STRUCT_CONVENTION have all been folded into # RETURN_VALUE. -f:=:void:extract_return_value:struct type *type, struct regcache *regcache, gdb_byte *valbuf:type, regcache, valbuf::legacy_extract_return_value::0 -f:=:void:store_return_value:struct type *type, struct regcache *regcache, const gdb_byte *valbuf:type, regcache, valbuf::legacy_store_return_value::0 -f:=:void:deprecated_extract_return_value:struct type *type, gdb_byte *regbuf, gdb_byte *valbuf:type, regbuf, valbuf -f:=:void:deprecated_store_return_value:struct type *type, gdb_byte *valbuf:type, valbuf +f:=:void:extract_return_value:struct type *type, struct regcache *regcache, gdb_byte *valbuf:type, regcache, valbuf:0 +f:=:void:store_return_value:struct type *type, struct regcache *regcache, const gdb_byte *valbuf:type, regcache, valbuf:0 f:=:int:deprecated_use_struct_convention:int gcc_p, struct type *value_type:gcc_p, value_type::generic_use_struct_convention::0 # As of 2004-01-17 only the 32-bit SPARC ABI has been identified as an diff --git a/gdb/regcache.c b/gdb/regcache.c index 508d3a2..bbb7801 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -388,12 +388,6 @@ regcache_valid_p (struct regcache *regcache, int regnum) return regcache->register_valid_p[regnum]; } -gdb_byte * -deprecated_grub_regcache_for_registers (struct regcache *regcache) -{ - return regcache->registers; -} - /* Global structure containing the current regcache. */ /* FIXME: cagney/2002-05-11: The two global arrays registers[] and deprecated_register_valid[] currently point into this structure. */ diff --git a/gdb/regcache.h b/gdb/regcache.h index 309ddb3..c6ce2e3 100644 --- a/gdb/regcache.h +++ b/gdb/regcache.h @@ -171,7 +171,6 @@ extern void regcache_cpy_no_passthrough (struct regcache *dest, struct regcache method, there should already be a non-deprecated variant that is parameterized with FRAME or REGCACHE. */ -extern gdb_byte *deprecated_grub_regcache_for_registers (struct regcache *); extern void deprecated_read_register_gen (int regnum, gdb_byte *myaddr); extern void deprecated_write_register_gen (int regnum, gdb_byte *myaddr); |