From: Andrew Cagney Date: Wed, 9 Jul 2003 14:35:26 +0000 (+0000) Subject: 2003-07-09 Andrew Cagney X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=96a4ee76e5e49942a5f75f2a97103eb3d1a97122;p=binutils-gdb.git 2003-07-09 Andrew Cagney * regcache.c (register_size): Only check REGISTER_RAW_SIZE once. Add comments about the checks. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index debd96e6968..466242d415d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2003-07-09 Andrew Cagney + + * regcache.c (register_size): Only check REGISTER_RAW_SIZE once. + Add comments about the checks. + 2003-07-08 Andrew Cagney * Makefile.in: Make dependency section headers consistent. diff --git a/gdb/regcache.c b/gdb/regcache.c index ce1d8118b4c..505f6aca013 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; }