diff options
author | Andrew Cagney <cagney@redhat.com> | 2004-06-09 21:26:48 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2004-06-09 21:26:48 +0000 |
commit | a1f4a1b6f2e0c887ff5606013d1f72fa0a2f668f (patch) | |
tree | d637e74b5f8641f63a746a972659e91d3c9fc7e8 /gdb | |
parent | 9730f241234216351ad23212d0a3f17cfc61a287 (diff) | |
download | binutils-a1f4a1b6f2e0c887ff5606013d1f72fa0a2f668f.zip binutils-a1f4a1b6f2e0c887ff5606013d1f72fa0a2f668f.tar.gz binutils-a1f4a1b6f2e0c887ff5606013d1f72fa0a2f668f.tar.bz2 |
2004-06-09 Andrew Cagney <cagney@gnu.org>
* gdbarch.sh (:REGISTER_TO_VALUE, VALUE_TO_REGISTER): Do not
provide a default value.
(CONVERT_REGISTER_P): Default to generic_convert_register_p.
* gdbarch.h, gdbarch.c: Re-generate.
* arch-utils.c (generic_convert_register_p): Rename
legacy_convert_register_p
(legacy_register_to_value, legacy_value_to_register): Delete
functions.
* arch-utils.h (generic_convert_register_p): Rename
legacy_convert_register_p.
(legacy_register_to_value, legacy_value_to_register): Delete
declarations.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 13 | ||||
-rw-r--r-- | gdb/arch-utils.c | 16 | ||||
-rw-r--r-- | gdb/arch-utils.h | 12 | ||||
-rw-r--r-- | gdb/gdbarch.c | 6 | ||||
-rwxr-xr-x | gdb/gdbarch.sh | 6 |
5 files changed, 20 insertions, 33 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d8bdc5b..1c7570e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,18 @@ 2004-06-09 Andrew Cagney <cagney@gnu.org> + * gdbarch.sh (REGISTER_TO_VALUE, VALUE_TO_REGISTER): Do not + provide a default value. + (CONVERT_REGISTER_P): Default to generic_convert_register_p. + * gdbarch.h, gdbarch.c: Re-generate. + * arch-utils.c (generic_convert_register_p): Rename + legacy_convert_register_p + (legacy_register_to_value, legacy_value_to_register): Delete + functions. + * arch-utils.h (generic_convert_register_p): Rename + legacy_convert_register_p. + (legacy_register_to_value, legacy_value_to_register): Delete + declarations. + * gdbarch.sh (DEPRECATED_REGISTER_CONVERT_TO_RAW) (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL) (DEPRECATED_REGISTER_CONVERTIBLE): Delete. diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index 0f7ea06..ccafd2b 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -299,25 +299,11 @@ legacy_pc_in_sigtramp (CORE_ADDR pc, char *name) } int -legacy_convert_register_p (int regnum, struct type *type) +generic_convert_register_p (int regnum, struct type *type) { return 0; } -void -legacy_register_to_value (struct frame_info *frame, int regnum, - struct type *type, void *to) -{ - internal_error (__FILE__, __LINE__, "legacy_register_to_value called"); -} - -void -legacy_value_to_register (struct frame_info *frame, int regnum, - struct type *type, const void *tmp) -{ - internal_error (__FILE__, __LINE__, "legacy_value_to_register called"); -} - int default_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type) { diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h index b636a1f..f427424 100644 --- a/gdb/arch-utils.h +++ b/gdb/arch-utils.h @@ -113,16 +113,8 @@ extern int generic_register_byte (int regnum); /* Prop up old targets that use various sigtramp macros. */ extern int legacy_pc_in_sigtramp (CORE_ADDR pc, char *name); -/* The orginal register_convert*() functions were overloaded. They - were used to both: convert between virtual and raw register formats - (something that is discouraged); and to convert a register to the - type of a corresponding variable. These legacy functions preserve - that overloaded behavour in existing targets. */ -extern int legacy_convert_register_p (int regnum, struct type *type); -extern void legacy_register_to_value (struct frame_info *frame, int regnum, - struct type *type, void *to); -extern void legacy_value_to_register (struct frame_info *frame, int regnum, - struct type *type, const void *from); +/* By default, registers are not convertible. */ +extern int generic_convert_register_p (int regnum, struct type *type); extern int default_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type); diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 553935d..8640e00 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -463,9 +463,7 @@ gdbarch_alloc (const struct gdbarch_info *info, current_gdbarch->cannot_fetch_register = cannot_register_not; current_gdbarch->cannot_store_register = cannot_register_not; current_gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy; - current_gdbarch->convert_register_p = legacy_convert_register_p; - current_gdbarch->register_to_value = legacy_register_to_value; - current_gdbarch->value_to_register = legacy_value_to_register; + current_gdbarch->convert_register_p = generic_convert_register_p; current_gdbarch->pointer_to_address = unsigned_pointer_to_address; current_gdbarch->address_to_pointer = unsigned_address_to_pointer; current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not; @@ -611,8 +609,6 @@ verify_gdbarch (struct gdbarch *current_gdbarch) /* Skip verify of deprecated_init_frame_pc, has predicate */ /* Skip verify of deprecated_get_saved_register, has predicate */ /* Skip verify of convert_register_p, invalid_p == 0 */ - /* Skip verify of register_to_value, invalid_p == 0 */ - /* Skip verify of value_to_register, invalid_p == 0 */ /* 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 */ diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index d06b9c8..5f3cc56 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -550,9 +550,9 @@ F:2:DEPRECATED_INIT_FRAME_PC:CORE_ADDR:deprecated_init_frame_pc:int fromleaf, st v:2:BELIEVE_PCC_PROMOTION:int:believe_pcc_promotion::::::: F:2:DEPRECATED_GET_SAVED_REGISTER:void:deprecated_get_saved_register:char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval:raw_buffer, optimized, addrp, frame, regnum, lval # -f:1:CONVERT_REGISTER_P:int:convert_register_p:int regnum, struct type *type:regnum, type::0:legacy_convert_register_p::0 -f:1:REGISTER_TO_VALUE:void:register_to_value:struct frame_info *frame, int regnum, struct type *type, void *buf:frame, regnum, type, buf::0:legacy_register_to_value::0 -f:1:VALUE_TO_REGISTER:void:value_to_register:struct frame_info *frame, int regnum, struct type *type, const void *buf:frame, regnum, type, buf::0:legacy_value_to_register::0 +f:1:CONVERT_REGISTER_P:int:convert_register_p:int regnum, struct type *type:regnum, type::0:generic_convert_register_p::0 +f:1:REGISTER_TO_VALUE:void:register_to_value:struct frame_info *frame, int regnum, struct type *type, void *buf:frame, regnum, type, buf::0 +f:1:VALUE_TO_REGISTER:void:value_to_register:struct frame_info *frame, int regnum, struct type *type, const void *buf:frame, regnum, type, buf::0 # f:2:POINTER_TO_ADDRESS:CORE_ADDR:pointer_to_address:struct type *type, const void *buf:type, buf:::unsigned_pointer_to_address::0 f:2:ADDRESS_TO_POINTER:void:address_to_pointer:struct type *type, void *buf, CORE_ADDR addr:type, buf, addr:::unsigned_address_to_pointer::0 |