summaryrefslogtreecommitdiff
path: root/gdb/arch-utils.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-05-12 03:09:12 +0000
committerAndrew Cagney <cagney@redhat.com>2002-05-12 03:09:12 +0000
commit314bbf98bb53117b1913fcbc517d56b8e69aa597 (patch)
tree058a187c417f872e867a996daa3e9960870b0cbf /gdb/arch-utils.h
parentc3de9d1c4d54663868fba9731146199c69f612db (diff)
downloadgdb-314bbf98bb53117b1913fcbc517d56b8e69aa597.tar.gz
* arch-utils.h (legacy_register_to_value): Declare.
(legacy_value_to_register): Declare. (legacy_convert_register_p): Declare. * arch-utils.c (legacy_register_to_value): New function. (legacy_value_to_register): New function. (legacy_convert_register_p): New function. * gdbarch.sh (REGISTER_TO_VALUE): Define. (VALUE_TO_REGISTER): Define. (CONVERT_REGISTER_P): Define. * gdbarch.h, gdbarch.c: Regenerate. * valops.c (value_assign): Use CONVERT_REGISTER_P and VALUE_TO_REGISTER. * findvar.c (value_from_register): Use REGISTER_TO_VALUE and CONVERT_REGISTER_P. * gdbint.texinfo (Target Architecture Definition): Document REGISTER_TO_VALUE and VALUE_TO_REGISTER and CONVERT_REGISTER_P. (Target Architecture Definition): Revise section `Using Different Register and Memory Data Representations'. Add section `Raw and Virtual Register Representations'.
Diffstat (limited to 'gdb/arch-utils.h')
-rw-r--r--gdb/arch-utils.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h
index bcd17aaf713..594a83209a3 100644
--- a/gdb/arch-utils.h
+++ b/gdb/arch-utils.h
@@ -157,6 +157,15 @@ extern int generic_register_size (int regnum);
/* Prop up old targets that use various IN_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);
+extern void legacy_register_to_value (int regnum, struct type *type, char *from, char *to);
+extern void legacy_value_to_register (struct type *type, int regnum, char *from, char *to);
+
/* Initialize a ``struct info''. Can't use memset(0) since some
default values are not zero. */
extern void gdbarch_info_init (struct gdbarch_info *info);