configure.in -- decide whether to configure gdb.hp; configure -- regenerated.
[deliverable/binutils-gdb.git] / gdb / serial.c
index 496e308ee13a26805f515da99efea46accacccaf..07638ed249e6552142638d70d67a92b065359997 100644 (file)
@@ -39,10 +39,10 @@ static serial_t scb_base;
    suitable for playback by gdbserver. */
 
 static char *serial_logfile = NULL;
-static FILE *serial_logfp = NULL;
+static GDB_FILE *serial_logfp = NULL;
 
 static struct serial_ops *serial_interface_lookup PARAMS ((char *));
-static void serial_logchar PARAMS ((int chtype, int ch, int timeout));
+static void serial_logchar PARAMS ((int, int, int));
 static char logbase_hex[] = "hex";
 static char logbase_octal[] = "octal";
 static char logbase_ascii[] = "ascii";
@@ -59,15 +59,15 @@ static int serial_current_type = 0;
 #define SERIAL_BREAK 1235
 
 static void
-serial_logchar (chtype, ch, timeout)
-     int chtype;
+serial_logchar (ch_type, ch, timeout)
+     int ch_type;
      int ch;
      int timeout;
 {
-  if (chtype != serial_current_type)
+  if (ch_type != serial_current_type)
     {
-      fprintf_unfiltered (serial_logfp, "\n%c ", chtype);
-      serial_current_type = chtype;
+      fprintf_unfiltered (serial_logfp, "\n%c ", ch_type);
+      serial_current_type = ch_type;
     }
 
   if (serial_logbase != logbase_ascii)
@@ -212,7 +212,9 @@ serial_open (name)
        return scb;
       }
 
-  if (strcmp (name, "pc") == 0)
+  if (strcmp (name, "ocd") == 0)
+    ops = serial_interface_lookup ("ocd");
+  else if (strcmp (name, "pc") == 0)
     ops = serial_interface_lookup ("pc");
   else if (strchr (name, ':'))
     ops = serial_interface_lookup ("tcp");
@@ -306,7 +308,8 @@ serial_close (scb, really_close)
       fputs_unfiltered ("\nEnd of log\n", serial_logfp);
       serial_current_type = 0;
 
-      fclose (serial_logfp);   /* XXX - What if serial_logfp == stdout or stderr? */
+      /* XXX - What if serial_logfp == gdb_stdout or gdb_stderr? */
+      gdb_fclose (serial_logfp); 
       serial_logfp = NULL;
     }
 
@@ -515,7 +518,7 @@ by gdbserver.", &setlist),
   add_show_from_set (add_set_enum_cmd ("remotelogbase", no_class,
                                       logbase_enums,
                                       (char *)&serial_logbase,
-                                      "Set ...",
+                                      "Set numerical base for remote session logging",
                                       &setlist),
                           &showlist);
 }
This page took 0.024994 seconds and 4 git commands to generate.