* remote-mips.c (mips_load): Replace call to regcache_set_valid_p,
authorJoel Brobecker <brobecker@gnat.com>
Mon, 16 Mar 2009 21:12:46 +0000 (21:12 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Mon, 16 Mar 2009 21:12:46 +0000 (21:12 +0000)
        which is undefined, by call to regcache_invalidate, which should
        do what the original author wanted to do.

gdb/ChangeLog
gdb/remote-mips.c

index 0ba4dcc..b6474de 100644 (file)
@@ -1,5 +1,11 @@
 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.
+
+2009-03-16  Joel Brobecker  <brobecker@adacore.com>
+
        * remote-mips.c (mips_mourn_inferior): Add missing ops parameter.
        (mips_create_inferior): Likewise.
 
index 348a63c..9b514b1 100644 (file)
@@ -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));