* serial.c (serial_write): Handle serial_debug_p akin to serial_read.
authorDoug Evans <dje@google.com>
Mon, 26 Apr 2010 21:45:50 +0000 (21:45 +0000)
committerDoug Evans <dje@google.com>
Mon, 26 Apr 2010 21:45:50 +0000 (21:45 +0000)
gdb/ChangeLog
gdb/serial.c

index 405ab221699447005390d0a21d8d863bb7cdaecc..9f221fd6167e8aff0e172fb09b1e5f5a244b45c5 100644 (file)
@@ -1,3 +1,7 @@
+2010-04-26  Doug Evans  <dje@google.com>
+
+       * serial.c (serial_write): Handle serial_debug_p akin to serial_read.
+
 2010-04-26  Tom Tromey  <tromey@redhat.com>
 
        * cli/cli-decode.c (complete_on_cmdlist): Make two passes over the
index 986326aa4d1990950d4d5132b17681ef1b010ec9..305ac33edf930a3406964162ff341baa383c1e70 100644 (file)
@@ -408,6 +408,18 @@ serial_write (struct serial *scb, const char *str, int len)
          in case we are getting ready to dump core or something. */
       gdb_flush (serial_logfp);
     }
+  if (serial_debug_p (scb))
+    {
+      int count;
+
+      for (count = 0; count < len; count++)
+       {
+         fprintf_unfiltered (gdb_stdlog, "[");
+         serial_logchar (gdb_stdlog, 'w', str[count] & 0xff, 0);
+         fprintf_unfiltered (gdb_stdlog, "]");
+       }
+      gdb_flush (gdb_stdlog);
+    }
 
   return (scb->ops->write (scb, str, len));
 }
This page took 0.030344 seconds and 4 git commands to generate.