diff options
author | Jim Blandy <jimb@codesourcery.com> | 2004-08-04 17:50:55 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2004-08-04 17:50:55 +0000 |
commit | 7ab3286fbed75475c383ae77aa909aa5efd7dac4 (patch) | |
tree | b1eb459de12c1756a7162ed9e1efa357d8697b66 /gdb | |
parent | Add missing function name to ChangeLog entry. (diff) | |
download | binutils-gdb-7ab3286fbed75475c383ae77aa909aa5efd7dac4.tar.gz binutils-gdb-7ab3286fbed75475c383ae77aa909aa5efd7dac4.tar.bz2 binutils-gdb-7ab3286fbed75475c383ae77aa909aa5efd7dac4.zip |
* regcache.c (regcache_raw_read): Assert that, after calling
target_fetch_registers, the register we're reading is cached.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 3 | ||||
-rw-r--r-- | gdb/regcache.c | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1853d9c68ad..eb26faa6938 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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, diff --git a/gdb/regcache.c b/gdb/regcache.c index b45740d7e13..411392c41f2 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -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), |