summaryrefslogtreecommitdiff
path: root/gdb/serial.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2010-04-26 21:45:47 +0000
committerDoug Evans <dje@google.com>2010-04-26 21:45:47 +0000
commitf6b587fb8a8680d676bc232dfc06e6dc2ff645d7 (patch)
tree8e1736e04dfd7dee2fdb812e71d250473bd7f2cb /gdb/serial.c
parentc90f38fb38fe3b9885f0f4f2c89664d05206e719 (diff)
downloadgdb-f6b587fb8a8680d676bc232dfc06e6dc2ff645d7.tar.gz
* serial.c (serial_write): Handle serial_debug_p akin to serial_read.
Diffstat (limited to 'gdb/serial.c')
-rw-r--r--gdb/serial.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/serial.c b/gdb/serial.c
index 986326aa4d1..305ac33edf9 100644
--- a/gdb/serial.c
+++ b/gdb/serial.c
@@ -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));
}