Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Question about when stdout is flushed in gdb/mi mode
@ 2008-02-19 16:39 Gordon Prieur
  2008-02-19 17:52 ` Dave Korn
  2008-02-19 18:20 ` Daniel Jacobowitz
  0 siblings, 2 replies; 3+ messages in thread
From: Gordon Prieur @ 2008-02-19 16:39 UTC (permalink / raw)
  To: gdb

Hi,

    If I do several printf command before a breakpoint in normal
command line gdb, the stdout gets flushed prior to showing the stop
message in gdb. If I do the same thing in mi mode from a tty, I get
the same results. But if I do this from NetBeans (where gdb isn't
running in a tty), the output doesn't get flushed and hence doesn't
get shown before the stop.

    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[1])" work. Is there anyway to force gdb to flush
stdout when it stops?

Thanks,
Gordon


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-02-19 18:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-19 16:39 Question about when stdout is flushed in gdb/mi mode Gordon Prieur
2008-02-19 17:52 ` Dave Korn
2008-02-19 18:20 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox