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]

Re: RFA: assert that target_fetch_registers did its job


I've committed the following:

2004-07-21  Jim Blandy  <jimb@redhat.com>

	* regcache.c (regcache_raw_read): Assert that, after calling
        target_fetch_registers, the register we're reading is cached.

Index: gdb/regcache.c
===================================================================
RCS file: /cvs/src/src/gdb/regcache.c,v
retrieving revision 1.121
diff -c -p -r1.121 regcache.c
*** gdb/regcache.c	2 Aug 2004 21:58:44 -0000	1.121
--- gdb/regcache.c	2 Aug 2004 23:18:56 -0000
*************** regcache_raw_read (struct regcache *regc
*** 614,619 ****
--- 614,620 ----
  	}
        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),


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