This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit] Allow cached cooked reads


Just stumbled across this. When trying to save cooked registers the regcache was triggering an assertion failure instead of ignoring a bogus request.

committed,
Andrew
2003-06-16  Andrew Cagney  <cagney@redhat.com>

	* regcache.c (do_cooked_read): Do not use register_valid_p.

Index: regcache.c
===================================================================
RCS file: /cvs/src/src/gdb/regcache.c,v
retrieving revision 1.87
diff -u -r1.87 regcache.c
--- regcache.c	9 Jun 2003 01:02:06 -0000	1.87
+++ regcache.c	16 Jun 2003 13:18:46 -0000
@@ -423,8 +423,7 @@
 do_cooked_read (void *src, int regnum, void *buf)
 {
   struct regcache *regcache = src;
-  if (!regcache_valid_p (regcache, regnum)
-      && regcache->readonly_p)
+  if (!regcache->register_valid_p[regnum] && regcache->readonly_p)
     /* Don't even think about fetching a register from a read-only
        cache when the register isn't yet valid.  There isn't a target
        from which the register value can be fetched.  */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]