2004-06-09 Andrew Cagney <cagney@gnu.org>
authorAndrew Cagney <cagney@redhat.com>
Wed, 9 Jun 2004 21:26:48 +0000 (21:26 +0000)
committerAndrew Cagney <cagney@redhat.com>
Wed, 9 Jun 2004 21:26:48 +0000 (21:26 +0000)
* 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.

gdb/ChangeLog
gdb/arch-utils.c
gdb/arch-utils.h
gdb/gdbarch.c
gdb/gdbarch.sh

index d8bdc5ba4339f59c2f8e022ce21adfe6f988952d..1c7570e55794c0b0fca44f58d3cbbdc2af8df5d1 100644 (file)
@@ -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.
index 0f7ea06242ee41ca14fe0ad67a22b3feec61a9b5..ccafd2ba06d4b8ad31474c350309225635a9c0e5 100644 (file)
@@ -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)
 {
index b636a1f429fb3d9601b31b8388134b0b357cb3a4..f427424f730d1c26e14751c6bb1cb75cb4adbdbb 100644 (file)
@@ -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);
index 553935dbf7d33261fd1261067c4a3e92afd3578f..8640e00b158b68ed1883bad76c75ea6341d47e97 100644 (file)
@@ -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 */
index d06b9c8f52396fca7c212bb14b0ff691c98c6e80..5f3cc56729e557e5a277c8379babcbc74e72bf1f 100755 (executable)
@@ -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