* 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'.
This commit is contained in:
Andrew Cagney
2002-05-12 03:09:12 +00:00
parent 4a1970e4a4
commit 13d0122493
10 changed files with 344 additions and 27 deletions

View File

@@ -429,6 +429,26 @@ legacy_pc_in_sigtramp (CORE_ADDR pc, char *name)
return IN_SIGTRAMP(pc, name);
}
int
legacy_convert_register_p (int regnum)
{
return REGISTER_CONVERTIBLE (regnum);
}
void
legacy_register_to_value (int regnum, struct type *type,
char *from, char *to)
{
REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to);
}
void
legacy_value_to_register (struct type *type, int regnum,
char *from, char *to)
{
REGISTER_CONVERT_TO_RAW (type, regnum, from, to);
}
/* Functions to manipulate the endianness of the target. */