This is the mail archive of the
mailing list for the GDB project.
RE: Question about when stdout is flushed in gdb/mi mode
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'Gordon Prieur'" <Gordon dot Prieur at Sun dot COM>, <gdb at sourceware dot org>
- Date: Tue, 19 Feb 2008 16:38:40 -0000
- Subject: RE: Question about when stdout is flushed in gdb/mi mode
- References: <47BB0490.email@example.com>
On 19 February 2008 16:32, Gordon Prieur wrote:
> Looking at the gdb options, I don't see anyway of forcing a
> flush of stdout. Since stdout isn't a variable and libc is typically
> optimized without debug information, neither "fflush(stdout)" nor
> "fflush(&__iob)" work. Is there anyway to force gdb to flush
> stdout when it stops?
You could always rely on the default behaviour of "fflush (NULL)", if you
don't mind other descriptors getting flushed too.
Can't think of a witty .sigline today....