diff options
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 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)); } |