]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2003-07-09 Andrew Cagney <cagney@redhat.com>
authorAndrew Cagney <cagney@redhat.com>
Wed, 9 Jul 2003 14:35:26 +0000 (14:35 +0000)
committerAndrew Cagney <cagney@redhat.com>
Wed, 9 Jul 2003 14:35:26 +0000 (14:35 +0000)
* regcache.c (register_size): Only check REGISTER_RAW_SIZE once.
Add comments about the checks.

gdb/ChangeLog
gdb/regcache.c

index debd96e69687aa23a135ff804ddb58b2d566106f..466242d415d7333619059d215e5c09d553e2f73d 100644 (file)
@@ -1,3 +1,8 @@
+2003-07-09  Andrew Cagney  <cagney@redhat.com>
+
+       * regcache.c (register_size): Only check REGISTER_RAW_SIZE once.
+       Add comments about the checks.
+
 2003-07-08  Andrew Cagney  <cagney@redhat.com>
 
        * Makefile.in: Make dependency section headers consistent.
index ce1d8118b4c6c15fc43df0885177c440306a6f74..505f6aca01322ec50da560f648c2043526df61c6 100644 (file)
@@ -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;
 }