diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2007-04-28 21:52:38 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2007-04-28 21:52:38 +0000 |
commit | 6ed7ea50e87eddecb4c6774de0c0fc0f9c503552 (patch) | |
tree | 71101c046ab227bc0b35313084317109e6cbdbe8 /gdb/regcache.c | |
parent | efc72ef5c00fc2d069b8d5cca7906c8004eca819 (diff) | |
download | fsf-binutils-gdb-6ed7ea50e87eddecb4c6774de0c0fc0f9c503552.zip fsf-binutils-gdb-6ed7ea50e87eddecb4c6774de0c0fc0f9c503552.tar.gz fsf-binutils-gdb-6ed7ea50e87eddecb4c6774de0c0fc0f9c503552.tar.bz2 |
* gdbarch.sh: Remove deprecated_register_byte.
* gdbarch.c, gdbarch.h: Regenerate.
* arch-utils.h (generic_register_size, generic_register_byte): Remove.
* arch-utils.c (generic_register_size, generic_register_byte): Remove.
* regcache.h (regcache_valid_p): Make REGCACHE parameter const.
* regcache.c (regcache_valid_p): Allow to query cooked registers in
read-only register caches. Make REGCACHE parameter const.
(regcache_dump): Do not check DEPRECATED_REGISTER_BYTE.
* mi/mi-main.c (old_regs): Remove.
(mi_setup_architecture_data, _initialize_mi_main): Remove.
(register_changed_p): Reimplement to compare two register caches.
(mi_cmd_data_list_changed_registers): Update caller.
* mi/mi-main.h (mi_setup_architecture_data): Remove.
* mi/mi-interp.c (mi_interpreter_init): Do not call
mi_setup_architecture_data.
Diffstat (limited to 'gdb/regcache.c')
-rw-r--r-- | gdb/regcache.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gdb/regcache.c b/gdb/regcache.c index a8fdac96..11810ef 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -381,10 +381,15 @@ regcache_dup_no_passthrough (struct regcache *src) } int -regcache_valid_p (struct regcache *regcache, int regnum) +regcache_valid_p (const struct regcache *regcache, int regnum) { gdb_assert (regcache != NULL); - gdb_assert (regnum >= 0 && regnum < regcache->descr->nr_raw_registers); + gdb_assert (regnum >= 0); + if (regcache->readonly_p) + gdb_assert (regnum < regcache->descr->nr_cooked_registers); + else + gdb_assert (regnum < regcache->descr->nr_raw_registers); + return regcache->register_valid_p[regnum]; } @@ -1107,7 +1112,6 @@ regcache_dump (struct regcache *regcache, struct ui_file *file, fprintf_unfiltered (file, " %6ld", regcache->descr->register_offset[regnum]); if (register_offset != regcache->descr->register_offset[regnum] - || register_offset != DEPRECATED_REGISTER_BYTE (regnum) || (regnum > 0 && (regcache->descr->register_offset[regnum] != (regcache->descr->register_offset[regnum - 1] |