diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-07-03 14:34:29 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-07-03 14:34:29 +0000 |
commit | dadd712e2163158cb9ae3a56099a4d36d78bcbc6 (patch) | |
tree | 87d2f90e06397191d1e016779e834d5940e064ac /gdb/gdbarch.h | |
parent | ab8c7bb13f6916e68cf5e83d4523890e1f9f95b7 (diff) | |
download | gdb-dadd712e2163158cb9ae3a56099a4d36d78bcbc6.zip gdb-dadd712e2163158cb9ae3a56099a4d36d78bcbc6.tar.gz gdb-dadd712e2163158cb9ae3a56099a4d36d78bcbc6.tar.bz2 |
2003-07-03 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (REGISTER_RAW_SIZE, REGISTER_VIRTUAL_SIZE): Add
predicate.
* gdbarch.h, gdbarch.c: Re-generate.
* regcache.c (init_regcache_descr): Use legacy code when either
REGISTER_BYTE or REGISTER_RAW_SIZE is set.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r-- | gdb/gdbarch.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 4dd7cfa9..0242d5b 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -709,6 +709,26 @@ extern void set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, gdbar DEPRECATED_REGISTER_RAW_SIZE can be deleted. See: maint print registers. */ +#if defined (REGISTER_RAW_SIZE) +/* Legacy for systems yet to multi-arch REGISTER_RAW_SIZE */ +#if !defined (REGISTER_RAW_SIZE_P) +#define REGISTER_RAW_SIZE_P() (1) +#endif +#endif + +/* Default predicate for non- multi-arch targets. */ +#if (!GDB_MULTI_ARCH) && !defined (REGISTER_RAW_SIZE_P) +#define REGISTER_RAW_SIZE_P() (0) +#endif + +extern int gdbarch_deprecated_register_raw_size_p (struct gdbarch *gdbarch); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_RAW_SIZE_P) +#error "Non multi-arch definition of REGISTER_RAW_SIZE" +#endif +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_RAW_SIZE_P) +#define REGISTER_RAW_SIZE_P() (gdbarch_deprecated_register_raw_size_p (current_gdbarch)) +#endif + /* Default (function) for non- multi-arch platforms. */ #if (!GDB_MULTI_ARCH) && !defined (REGISTER_RAW_SIZE) #define REGISTER_RAW_SIZE(reg_nr) (generic_register_size (reg_nr)) @@ -729,6 +749,26 @@ extern void set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, g DEPRECATED_REGISTER_VIRTUAL_SIZE can be deleted. See: maint print registers. */ +#if defined (REGISTER_VIRTUAL_SIZE) +/* Legacy for systems yet to multi-arch REGISTER_VIRTUAL_SIZE */ +#if !defined (REGISTER_VIRTUAL_SIZE_P) +#define REGISTER_VIRTUAL_SIZE_P() (1) +#endif +#endif + +/* Default predicate for non- multi-arch targets. */ +#if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_SIZE_P) +#define REGISTER_VIRTUAL_SIZE_P() (0) +#endif + +extern int gdbarch_deprecated_register_virtual_size_p (struct gdbarch *gdbarch); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_SIZE_P) +#error "Non multi-arch definition of REGISTER_VIRTUAL_SIZE" +#endif +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_VIRTUAL_SIZE_P) +#define REGISTER_VIRTUAL_SIZE_P() (gdbarch_deprecated_register_virtual_size_p (current_gdbarch)) +#endif + /* Default (function) for non- multi-arch platforms. */ #if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_SIZE) #define REGISTER_VIRTUAL_SIZE(reg_nr) (generic_register_size (reg_nr)) |