* target.h: Add enum target_waitkind, enum target_signal, and
[deliverable/binutils-gdb.git] / gdb / remote-mon.c
index 02514016db725390c93f9d72a004178c95a9bc2c..0cb5dd73b1d077e9d32c3090e5f7a9666882b864 100644 (file)
@@ -76,6 +76,7 @@ static int sr_get_debug();                    /* flag set by "set remotedebug" */
 #endif
 static int hashmark;                           /* flag set by "set hash" */
 
+/* FIXME: Replace with sr_get_debug ().  */
 #define LOG_FILE "monitor.log"
 #if defined (LOG_FILE)
 FILE *log_file;
@@ -288,9 +289,6 @@ monitor_create_inferior (execfile, args, env)
 
   entry_pt = (int) bfd_get_start_address (exec_bfd);
 
-#ifdef CREATE_INFERIOR_HOOK
-  CREATE_INFERIOR_HOOK (0);            /* No process-ID */
-#endif  
 #ifdef LOG_FILE
   fputs ("\nIn Create_inferior()", log_file);
 #endif
@@ -437,7 +435,8 @@ monitor_detach (from_tty)
  */
 static void
 monitor_resume (pid, step, sig)
-     int pid, step, sig;
+     int pid, step;
+     enum target_signal sig;
 {
 #ifdef LOG_FILE
   fprintf (log_file, "\nIn Resume (step=%d, sig=%d)\n", step, sig);
@@ -463,21 +462,24 @@ monitor_resume (pid, step, sig)
  */
 
 static int
-monitor_wait (status)
-     WAITTYPE *status;
+monitor_wait (pid, status)
+     int pid;
+     struct target_waitstatus *status;
 {
   int old_timeout = timeout;
 #ifdef LOG_FILE
   fputs ("\nIn wait ()", log_file);
 #endif
 
-  WSETEXIT ((*status), 0);
+  status->kind = TARGET_WAITKIND_EXITED;
+  status->value.integer = 0;
 
   timeout = 0;         /* Don't time out -- user program is running. */
 
   expect_prompt(0);    /* Wait for prompt, outputting extraneous text */
 
-  WSETSTOP ((*status), SIGTRAP);
+  status->kind = TARGET_WAITKIND_STOPPED;
+  status->value.sig = TARGET_SIGNAL_TRAP;
 
   timeout = old_timeout;
 
@@ -1178,14 +1180,6 @@ Specify the serial device it is connected to (e.g. /dev/ttya).",
 void
 _initialize_remote_monitors ()
 {
-/***  add_show_from_set (
-                     add_set_cmd ("remotedebug", no_class, var_boolean,
-                                  (char *)&kiodebug,
-                                  "Set debugging of I/O to a serial based Monitor.\n\
-When enabled, debugging info is displayed.",
-                                  &setlist),
-                    &showlist);
-***/
   add_show_from_set (
                      add_set_cmd ("hash", no_class, var_boolean,
                                   (char *)&hashmark,
This page took 0.023668 seconds and 4 git commands to generate.