[PATCH] Fix bug 15186 Agent style dprintf does not buffer output properly

Hui Zhu
2013-04-19T10:59:06Z

[-- Attachment #1: Type: text/plain, Size: 273 bytes --]

Hi,

This patch fix http://sourceware.org/bugzilla/show_bug.cgi?id=15186

Add a fflash to make the output of dprintf can be shown at once.

Please help me review it.

Thanks,
Hui

2013-04-19 Hui Zhu <hui@codesourcery.com>

PR gdb/15186

* ax.c (ax_printf): Add fflush.

[-- Attachment #2: dprintf-agent-fflash.txt --]
[-- Type: text/plain, Size: 247 bytes --]

--- a/gdb/gdbserver/ax.c
+++ b/gdb/gdbserver/ax.c
@@ -905,6 +905,7 @@ ax_printf (CORE_ADDR fn, CORE_ADDR chan,
}

free_format_pieces (fpieces);
+ fflush (stdout);
}

/* The agent expression evaluator, as specified by the GDB docs. It