From 9214d3714ab60f9f5811fc250632ae98f6a94102 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Mon, 26 Apr 2010 21:45:50 +0000 Subject: * serial.c (serial_write): Handle serial_debug_p akin to serial_read. --- gdb/serial.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'gdb/serial.c') 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)); } -- cgit v1.1