import gdb-1999-07-05 snapshot
[binutils-gdb.git] / gdb / remote-sim.c
index e10fcedd6b760ebfbb53768baac7624f5d5d43a7..8923aec658d2502eae284c6de05d79acef0718c0 100644 (file)
@@ -39,6 +39,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 /* Prototypes */
 
+extern void _initialize_remote_sim PARAMS ((void));
+
+extern int (*ui_loop_hook) PARAMS ((int signo));
+
 static void dump_mem PARAMS ((char *buf, int len));
 
 static void init_callbacks PARAMS ((void));
@@ -193,10 +197,7 @@ gdb_os_write_stdout (p, buf, len)
     {
       b[0] = buf[i];
       b[1] = 0;
-      if (target_output_hook)
-       target_output_hook (b);
-      else
-       fputs_filtered (b, gdb_stdout);
+      fputs_unfiltered (b, gdb_stdtarg);
     }
   return len;
 }
@@ -225,10 +226,7 @@ gdb_os_write_stderr (p, buf, len)
     {
       b[0] = buf[i];
       b[1] = 0;
-      if (target_output_hook)
-       target_output_hook (b);
-      else
-       fputs_filtered (b, gdb_stderr);
+      fputs_unfiltered (b, gdb_stdtarg);
     }
   return len;
 }
@@ -478,7 +476,7 @@ gdbsim_create_inferior (exec_file, args, env)
       strcat (arg_buf, " ");
       strcat (arg_buf, args);
       argv = buildargv (arg_buf);
-      make_cleanup ((make_cleanup_func) freeargv, argv);
+      make_cleanup_freeargv (argv);
     }
   else
     argv = NULL;
@@ -559,7 +557,7 @@ gdbsim_open (args, from_tty)
   argv = buildargv (arg_buf);
   if (argv == NULL)
     error ("Insufficient memory available to allocate simulator arg list.");
-  make_cleanup ((make_cleanup_func) freeargv, argv);
+  make_cleanup_freeargv (argv);
 
   init_callbacks ();
   gdbsim_desc = sim_open (SIM_OPEN_DEBUG, &gdb_callback, exec_bfd, argv);
@@ -668,6 +666,9 @@ static int
 gdb_os_poll_quit (p)
      host_callback *p;
 {
+  if (ui_loop_hook != NULL)
+    ui_loop_hook (0);
+
   notice_quit ();
   if (quit_flag) /* gdb's idea of quit */
     {