aboutsummaryrefslogtreecommitdiff
path: root/gdb/regcache.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-07-09 14:35:26 +0000
committerAndrew Cagney <cagney@redhat.com>2003-07-09 14:35:26 +0000
commit96a4ee76e5e49942a5f75f2a97103eb3d1a97122 (patch)
tree38cc9319302fd2b29f55826a3e5f8431e0415e55 /gdb/regcache.c
parentd99968dcc1a351c6b5fcac17cbdc175bb11f61b9 (diff)
downloadgdb-96a4ee76e5e49942a5f75f2a97103eb3d1a97122.zip
gdb-96a4ee76e5e49942a5f75f2a97103eb3d1a97122.tar.gz
gdb-96a4ee76e5e49942a5f75f2a97103eb3d1a97122.tar.bz2
2003-07-09 Andrew Cagney <cagney@redhat.com>
* regcache.c (register_size): Only check REGISTER_RAW_SIZE once. Add comments about the checks.
Diffstat (limited to 'gdb/regcache.c')
-rw-r--r--gdb/regcache.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/regcache.c b/gdb/regcache.c
index ce1d811..505f6ac 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -290,8 +290,11 @@ register_size (struct gdbarch *gdbarch, int regnum)
int size;
gdb_assert (regnum >= 0 && regnum < (NUM_REGS + NUM_PSEUDO_REGS));
size = descr->sizeof_register[regnum];
+ /* NB: The deprecated REGISTER_RAW_SIZE, if not provided, defaults
+ to the size of the register's type. */
gdb_assert (size == REGISTER_RAW_SIZE (regnum)); /* OK */
- gdb_assert (size == REGISTER_RAW_SIZE (regnum)); /* OK */
+ /* NB: Don't check the register's virtual size. It, in say the case
+ of the MIPS, may not match the raw size! */
return size;
}