diff options
author | Doug Evans <dje@google.com> | 2010-04-26 21:45:50 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2010-04-26 21:45:50 +0000 |
commit | 9214d3714ab60f9f5811fc250632ae98f6a94102 (patch) | |
tree | e4f6040a90f7b442bdee78bae9b0717fe354ab54 /gdb/serial.c | |
parent | bdf92a1c039d3dfb07246213967bf109545e07a5 (diff) | |
download | gdb-9214d3714ab60f9f5811fc250632ae98f6a94102.zip gdb-9214d3714ab60f9f5811fc250632ae98f6a94102.tar.gz gdb-9214d3714ab60f9f5811fc250632ae98f6a94102.tar.bz2 |
* serial.c (serial_write): Handle serial_debug_p akin to serial_read.
Diffstat (limited to 'gdb/serial.c')
-rw-r--r-- | gdb/serial.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/serial.c b/gdb/serial.c index 986326a..305ac33 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)); } |