* regcache.c (regcache_raw_read): Assert that, after calling
authorJim Blandy <jimb@codesourcery.com>
Wed, 4 Aug 2004 17:50:55 +0000 (17:50 +0000)
committerJim Blandy <jimb@codesourcery.com>
Wed, 4 Aug 2004 17:50:55 +0000 (17:50 +0000)
target_fetch_registers, the register we're reading is cached.

gdb/ChangeLog
gdb/regcache.c

index 1853d9c68ad96cfd16aa381be431e232337704f7..eb26faa6938ba19b9eaf9e6abaeba83daca76450 100644 (file)
@@ -1,5 +1,8 @@
 2004-08-04  Jim Blandy  <jimb@redhat.com>
 
+       * regcache.c (regcache_raw_read): Assert that, after calling
+        target_fetch_registers, the register we're reading is cached.
+
        * ppc-linux-nat.c (fetch_register): Replace 'gdb_assert (0)' with
        a call to 'internal_error', with a more helpful error message.
        * rs6000-tdep.c (e500_pseudo_register_read,
index b45740d7e13d9bf9a5e679a6e587b5ea1c329238..411392c41f212b35f58adda27fd538a7f16a53ad 100644 (file)
@@ -614,6 +614,7 @@ regcache_raw_read (struct regcache *regcache, int regnum, void *buf)
        }
       if (!register_cached (regnum))
        target_fetch_registers (regnum);
+      gdb_assert (register_cached (regnum));
     }
   /* Copy the value directly into the register cache.  */
   memcpy (buf, register_buffer (regcache, regnum),