More wrong uses of gdb_stderr and stderr/stdout.
More upddates to calls of catch_errors() so that call matches new interface.
+Mon Jan 18 14:01:24 1999  Andrew Cagney  <cagney@b1.cygnus.com>
+
+       * remote-array.c (array_open): Don't use fprintf_filtered to send
+       data to the log file.
+
+       * remote-array.c (handle_load_dll): Change argument type to PTR so
+       that it is compatible with catch_errors.
+       * ocd.c (ocd_start_remote): Ditto.
+       * remote-sds.c (sds_start_remote): Ditto.
+
+       * win32-nat.c (win32_child_thread_alive): Namespace proof
+       child_thread_alive.
+       (init_child_ops): Update.
+
+Mon Jan 18 12:03:47 1999  Andrew Cagney  <cagney@b1.cygnus.com>
+
+       * remote-rdi.c (arm_rdi_open): Set gdb_hostif.hostosarg and
+       gdb_hostif.dbgarg to NULL instead of stdout.
+       (voiddummy, myprint, mywritec): Use gdb_stdout instead of stdout.
+
 Mon Jan 18 16:40:50 1999  Stan Shebs  <shebs@andros.cygnus.com>
 
        * ser-ocd.c (ocd_open): Handle Unix case gracefully.
 
 static int ocd_read_bytes PARAMS ((CORE_ADDR memaddr,
                                      char *myaddr, int len));
 
-static int ocd_start_remote PARAMS ((char *dummy));
+static int ocd_start_remote PARAMS ((PTR dummy));
 
 static int readchar PARAMS ((int timeout));
 
 
 static int
 ocd_start_remote (dummy)
-     char *dummy;
+     PTR dummy;
 {
   unsigned char buf[10], *p;
   int pktlen;
   int speed;
   enum ocd_target_type target_type;
 
-  target_type = (enum ocd_target_type)dummy;
+  target_type = *(enum ocd_target_type*)dummy;
 
   immediate_quit = 1;          /* Allow user to interrupt it */
 
   /* Start the remote connection; if error (0), discard this target.
      In particular, if the user quits, be sure to discard it
      (we'd be in an inconsistent state otherwise).  */
-  if (!catch_errors (ocd_start_remote, (char *)target_type,
+  if (!catch_errors (ocd_start_remote, &target_type,
                     "Couldn't establish connection to remote target\n",
                     RETURN_MASK_ALL))
     {
 
   log_file = fopen (LOG_FILE, "w");
   if (log_file == NULL)
     perror_with_name (LOG_FILE);
-  fprintf_filtered (log_file, "GDB %s (%s", version);
-  fprintf_filtered (log_file, " --target %s)\n", array_ops.to_shortname);
-  fprintf_filtered (log_file, "Remote target %s connected to %s\n\n", array_ops.to_shortname, dev_name);
+  fprintf (log_file, "GDB %s (%s", version);
+  fprintf (log_file, " --target %s)\n", array_ops.to_shortname);
+  fprintf (log_file, "Remote target %s connected to %s\n\n", array_ops.to_shortname, dev_name);
 #endif
 
   /* see if the target is alive. For a ROM monitor, we can just try to force the
 
 void
 voiddummy ()
 {
-  printf("void dummy\n");
+  fprintf_unfiltered (gdb_stdout, "void dummy\n");
 }
 
 static void
      const char *format;
      va_list ap;
 {
-  vfprintf (stdout, format, ap);
+  vfprintf_unfiltered (gdb_stdout, format, ap);
 }
 
 static void
      int c;
 {
   if (isascii (c))
-    fputc_unfiltered (c, (FILE *) arg);
+    fputc_unfiltered (c, gdb_stdout);
 }
 
 static int
 
   gdb_hostif.dbgprint = myprint;
   gdb_hostif.dbgpause = mypause;
-  gdb_hostif.dbgarg = stdout;
+  gdb_hostif.dbgarg = NULL;
   gdb_hostif.writec = mywritec;
   gdb_hostif.readc = myreadc;
   gdb_hostif.write = mywrite;
   gdb_hostif.gets = mygets;
-  gdb_hostif.hostosarg = stdout;
+  gdb_hostif.hostosarg = NULL;
   gdb_hostif.reset = voiddummy;
 
   rslt = angel_RDI_open (10, &gdb_config, &gdb_hostif, NULL);
 
 
 static void sds_resume PARAMS ((int, int, enum target_signal));
 
-static int sds_start_remote PARAMS ((char *));
+static int sds_start_remote PARAMS ((PTR));
 
 static void sds_open PARAMS ((char *, int));
 
 
 static int
 sds_start_remote (dummy)
-     char *dummy;
+     PTR dummy;
 {
   char c;
   unsigned char buf[200];
   /* Start the remote connection; if error (0), discard this target.
      In particular, if the user quits, be sure to discard it (we'd be
      in an inconsistent state otherwise).  */
-  if (!catch_errors (sds_start_remote, (char *)0, 
+  if (!catch_errors (sds_start_remote, NULL, 
                     "Couldn't establish connection to remote target\n",
                     RETURN_MASK_ALL))
     pop_target ();
 
 extern struct target_ops child_ops;
 
 static void child_stop PARAMS ((void));
-static int child_thread_alive PARAMS ((int));
+static int win32_child_thread_alive PARAMS ((int));
 
 static int last_sig = 0;       /* Set if a signal was received from the
                                   debugged process */
    of error; store status through argument pointer OURSTATUS.  */
 
 static int
-handle_load_dll (char *dummy)
+handle_load_dll (PTR dummy)
 {
   LOAD_DLL_DEBUG_INFO * event = ¤t_event.u.LoadDll;
   DWORD dll_name_ptr;
   child_ops.to_mourn_inferior =   child_mourn_inferior;
   child_ops.to_can_run  =   child_can_run;
   child_ops.to_notice_signals =   0;
-  child_ops.to_thread_alive  =   child_thread_alive;
+  child_ops.to_thread_alive  =   win32_child_thread_alive;
   child_ops.to_stop  =   child_stop;
   child_ops.to_stratum =   process_stratum;
   child_ops.DONT_USE =   0;
    by "polling" it.  If WaitForSingleObject returns WAIT_OBJECT_0
    it means that the pid has died.  Otherwise it is assumed to be alive. */
 static int
-child_thread_alive (int pid)
+win32_child_thread_alive (int pid)
 {
   return WaitForSingleObject(thread_rec (pid, FALSE)->h, 0) == WAIT_OBJECT_0 ?
         FALSE : TRUE;