* stabsread.c (get_substring): Declare second arg as int.
[deliverable/binutils-gdb.git] / gdb / remote-sim.c
index 3c1e1b6587577852247c2f418abea8076868ebdd..124022accb85ab20eecb54a9b836dd2f9fa72042 100644 (file)
@@ -34,6 +34,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "gdbcore.h"
 #include "remote-sim.h"
 #include "remote-utils.h"
+#include "callback.h"
 
 /* Naming convention:
 
@@ -96,24 +97,6 @@ int regno;
 }
 
 
-int 
-sim_callback_write_stdout (arg, len)
-char *arg;
-int len;
-{
-  int i;
-  char b[2];
-  for (i = 0; i< len; i++) {
-    b[0] = arg[i];
-    b[1] = 0;
-    if (target_output_hook)
-      target_output_hook (b);
-    else
-      fputs_filtered (b, gdb_stdout);
-  }
-  return len;
-}
-
 static void
 gdbsim_store_register (regno)
 int regno;
@@ -169,7 +152,7 @@ gdbsim_load (prog, fromtty)
   program_loaded = 1;
 
   if (sim_load (prog, fromtty) != 0)
-    gr_load_image (prog, fromtty);
+    generic_load (prog, fromtty);
 }
 
 
@@ -235,11 +218,13 @@ gdbsim_open (args, from_tty)
   if (sr_get_debug ())
     printf_filtered ("gdbsim_open: args \"%s\"\n", args ? args : "(null)");
 
+  sim_set_callbacks (&default_callback);
+  default_callback.init (&default_callback);
+
   sim_open (args);
 
   push_target (&gdbsim_ops);
   target_fetch_registers (-1);
-
   printf_filtered ("Connected to the simulator.\n");
 }
 
@@ -295,6 +280,9 @@ gdbsim_resume (pid, step, siggnal)
      int pid, step;
      enum target_signal siggnal;
 {
+  if (inferior_pid != 42)
+    error ("The program is not being run.");
+
   if (sr_get_debug ())
     printf_filtered ("gdbsim_resume: step %d, signal %d\n", step, siggnal);
 
This page took 0.025037 seconds and 4 git commands to generate.