From: Doug Evans Date: Mon, 26 Apr 2010 21:45:50 +0000 (+0000) Subject: * serial.c (serial_write): Handle serial_debug_p akin to serial_read. X-Git-Tag: sid-snapshot-20100501~48 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9214d3714ab60f9f5811fc250632ae98f6a94102;p=external%2Fbinutils.git * serial.c (serial_write): Handle serial_debug_p akin to serial_read. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 405ab22..9f221fd 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2010-04-26 Doug Evans + + * serial.c (serial_write): Handle serial_debug_p akin to serial_read. + 2010-04-26 Tom Tromey * cli/cli-decode.c (complete_on_cmdlist): Make two passes over the 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)); }