diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-05-04 17:34:51 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-05-04 17:34:51 +0000 |
commit | 46654a5bcc3430a7219b2a8430578b4a5473214c (patch) | |
tree | 499f90a477c3f8c9ffa026a4768d18ca1ccbaa42 /gdb/gdbarch.c | |
parent | 54ff5908500fc0a8e83fcd8ffa779bf81eebd51b (diff) | |
download | gdb-46654a5bcc3430a7219b2a8430578b4a5473214c.zip gdb-46654a5bcc3430a7219b2a8430578b4a5473214c.tar.gz gdb-46654a5bcc3430a7219b2a8430578b4a5473214c.tar.bz2 |
2003-05-02 Andrew Cagney <cagney@redhat.com>
* sentinel-frame.c (sentinel_frame_prev_register): Replace
REGISTER_BYTE with register_offset_hack.
* regcache.c (init_regcache_descr): When REGISTER_BYTE_P, check
that REGISTER_BYTE is consistent with the regcache.
* gdbarch.sh (REGISTER_BYTE): Add a predicate.
* gdbarch.h, gdbarch.c: Regenerate.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r-- | gdb/gdbarch.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index f4058ff..7bfd06a 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -643,7 +643,7 @@ verify_gdbarch (struct gdbarch *gdbarch) /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */ /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */ /* Skip verify of register_name, invalid_p == 0 */ - /* Skip verify of register_byte, invalid_p == 0 */ + /* Skip verify of register_byte, has predicate */ /* Skip verify of register_raw_size, invalid_p == 0 */ /* Skip verify of deprecated_max_register_raw_size, has predicate */ /* Skip verify of register_virtual_size, invalid_p == 0 */ @@ -1975,6 +1975,15 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) fprintf_unfiltered (file, "gdbarch_dump: push_dummy_code = 0x%08lx\n", (long) current_gdbarch->push_dummy_code); +#ifdef REGISTER_BYTE_P + fprintf_unfiltered (file, + "gdbarch_dump: %s # %s\n", + "REGISTER_BYTE_P()", + XSTRING (REGISTER_BYTE_P ())); + fprintf_unfiltered (file, + "gdbarch_dump: REGISTER_BYTE_P() = %d\n", + REGISTER_BYTE_P ()); +#endif #ifdef REGISTER_BYTE fprintf_unfiltered (file, "gdbarch_dump: %s # %s\n", @@ -3318,12 +3327,20 @@ set_gdbarch_register_bytes (struct gdbarch *gdbarch, } int +gdbarch_register_byte_p (struct gdbarch *gdbarch) +{ + gdb_assert (gdbarch != NULL); + return gdbarch->register_byte != generic_register_byte; +} + +int gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr) { gdb_assert (gdbarch != NULL); if (gdbarch->register_byte == 0) internal_error (__FILE__, __LINE__, "gdbarch: gdbarch_register_byte invalid"); + /* Ignore predicate (gdbarch->register_byte != generic_register_byte). */ if (gdbarch_debug >= 2) fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n"); return gdbarch->register_byte (reg_nr); |