Merges from SKY branch:
[binutils-gdb.git] / gdb / remote-sim.c
index 452c631fe42468973617d5a669394877bc0b0952..f641d6f965a0dd70779f37f846d408a30a8c57b6 100644 (file)
@@ -97,7 +97,7 @@ static void gdbsim_mourn_inferior PARAMS ((void));
 
 static void gdbsim_stop PARAMS ((void));
 
-static void simulator_command PARAMS ((char *args, int from_tty));
+void simulator_command PARAMS ((char *args, int from_tty));
 
 /* Naming convention:
 
@@ -889,7 +889,7 @@ gdbsim_remove_breakpoint (addr, contents_cache)
 /* Pass the command argument through to the simulator verbatim.  The
    simulator must do any command interpretation work.  */
 
-static void
+void
 simulator_command (args, from_tty)
      char *args;
      int from_tty;
@@ -911,6 +911,10 @@ simulator_command (args, from_tty)
     }
 
   sim_do_command (gdbsim_desc, args);
+
+  /* Invalidate the register cache, in case the simulator command does
+     something funny. */
+  registers_changed (); 
 }
 
 /* Define the target subroutine names */