aboutsummaryrefslogtreecommitdiff
path: root/gdb/ui-file.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/ui-file.c')
-rw-r--r--gdb/ui-file.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/ui-file.c b/gdb/ui-file.c
index 690fc62..77f6b31 100644
--- a/gdb/ui-file.c
+++ b/gdb/ui-file.c
@@ -236,6 +236,12 @@ stdio_file::write_async_safe (const char *buf, long length_buf)
void
stdio_file::puts (const char *linebuffer)
{
+ /* This host-dependent function (with implementations in
+ posix-hdep.c and mingw-hdep.c) is given the opportunity to
+ process the output first in host-dependent way. If it does, it
+ should return non-zero, to avoid calling fputs below. */
+ if (gdb_console_fputs (linebuffer, m_file))
+ return;
/* Calling error crashes when we are called from the exception framework. */
if (fputs (linebuffer, m_file))
{