This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
src/gdb ChangeLog printcmd.c testsuite/ChangeL ...
- From: tromey at sourceware dot org
- To: gdb-cvs at sourceware dot org
- Date: Thu, 17 Oct 2013 18:29:28 +0000
- Subject: src/gdb ChangeLog printcmd.c testsuite/ChangeL ...
CVSROOT: /cvs/src
Module name: src
Changes by: tromey@sourceware.org 2013-10-17 18:29:28
Modified files:
gdb : ChangeLog printcmd.c
gdb/testsuite : ChangeLog
gdb/testsuite/gdb.base: printcmds.exp
Log message:
fix for PR gdb/15995
This patch fixes PR gdb/15995.
The bug here is that gdb's printf command does not flush the output
stream. This makes a printf that is not newline-terminated interleave
incorrectly with other forms of output, such as that generated via a
call to an external program using "shell".
I note that the "output" command already does this flushing.
The fix is to call gdb_flush in printf_command.
Built and regtested on x86-64 Fedora 18.
New test case included.
PR gdb/15995:
* printcmd.c (printcmd): Call gdb_flush.
* gdb.base/printcmds.exp (test_printf): Test printf flushing.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.16112&r2=1.16113
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/printcmd.c.diff?cvsroot=src&r1=1.234&r2=1.235
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.3837&r2=1.3838
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.base/printcmds.exp.diff?cvsroot=src&r1=1.54&r2=1.55