This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA/commit] undefined regcache_set_valid_p in remote-mips.c
- From: Joel Brobecker <brobecker at adacore dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 16 Mar 2009 15:54:30 -0400
- Subject: [RFA/commit] undefined regcache_set_valid_p in remote-mips.c
remote-mips.c no longer builds because of this call to regcache_set_valid_p.
I couldn't find any trace of that routine in our ChangeLogs and I'm right
in the middle of a rather large change in my git directory, so I didn't
bother investigate more about this routine.
I think that the routine that we want, right now, is called
regcache_invalidate.
2009-03-16 Joel Brobecker <brobecker@adacore.com>
* remote-mips.c (mips_load): Replace call to regcache_set_valid_p,
which is undefined, by call to regcache_invalidate, which should
do what the original author wanted to do.
Does this look plausible to anyone else? I'd just like a second pair
of eyes before I commit.
Thank you!
--
Joel
Index: remote-mips.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-mips.c,v
retrieving revision 1.97
diff -u -p -r1.97 remote-mips.c
--- remote-mips.c 16 Mar 2009 19:38:32 -0000 1.97
+++ remote-mips.c 16 Mar 2009 19:50:15 -0000
@@ -3276,9 +3276,9 @@ mips_load (char *file, int from_tty)
to a different value than GDB thinks it has. The following ensures
that the write_pc() WILL update the PC value: */
struct regcache *regcache = get_current_regcache ();
- regcache_set_valid_p (regcache,
- gdbarch_pc_regnum (get_regcache_arch (regcache)),
- 0);
+
+ regcache_invalidate (regcache,
+ gdbarch_pc_regnum (get_regcache_arch (regcache)));
}
if (exec_bfd)
write_pc (bfd_get_start_address (exec_bfd));