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/regcache.c | |
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/regcache.c')
-rw-r--r-- | gdb/regcache.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/gdb/regcache.c b/gdb/regcache.c index 509390f..ce1d811 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -178,16 +178,17 @@ init_regcache_descr (struct gdbarch *gdbarch) /* If an old style architecture, fill in the remainder of the register cache descriptor using the register macros. */ - if (!gdbarch_pseudo_register_read_p (gdbarch) - && !gdbarch_pseudo_register_write_p (gdbarch) - && !gdbarch_register_type_p (gdbarch)) + /* NOTE: cagney/2003-06-29: If either of REGISTER_BYTE or + REGISTER_RAW_SIZE are still present, things are most likely + totally screwed. Ex: an architecture with raw register sizes + smaller than what REGISTER_BYTE indicates; non monotonic + REGISTER_BYTE values. For GDB 6 check for these nasty methods + and fall back to legacy code when present. Sigh! */ + if ((!gdbarch_pseudo_register_read_p (gdbarch) + && !gdbarch_pseudo_register_write_p (gdbarch) + && !gdbarch_register_type_p (gdbarch)) + || REGISTER_BYTE_P () || REGISTER_RAW_SIZE_P ()) { - /* NOTE: cagney/2003-05-02: Don't add a test for REGISTER_BYTE_P - to the above. Doing that would cause all the existing - architectures to revert back to the legacy regcache - mechanisms, and that is not a good thing. Instead just, - later, check that the register cache's layout is consistent - with REGISTER_BYTE. */ descr->legacy_p = 1; init_legacy_regcache_descr (gdbarch, descr); return descr; |