aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/ax.c
diff options
context:
space:
mode:
authorAlan Hayward <alan.hayward@arm.com>2019-04-16 10:37:47 +0100
committerAlan Hayward <alan.hayward@arm.com>2019-04-17 10:42:46 +0100
commita7e559cc087b10b9ea337b58e52cc13964aae3fb (patch)
tree9d37b96a5ec1c3c53df5d92c2f2d86fcad65523c /gdb/gdbserver/ax.c
parentaeb2e706e1b9c491d20c88c8ead1ae9df9cee04a (diff)
downloadbinutils-a7e559cc087b10b9ea337b58e52cc13964aae3fb.zip
binutils-a7e559cc087b10b9ea337b58e52cc13964aae3fb.tar.gz
binutils-a7e559cc087b10b9ea337b58e52cc13964aae3fb.tar.bz2
gdbserver: Ensure all debug output uses debug functions
All debug output needs to go via debug functions to ensure it writes to the correct output stream. gdb/ChangeLog: * nat/linux-waitpid.c (linux_debug): Call debug_vprintf. gdb/gdbserver/ChangeLog: * ax.c (ax_vdebug): Call debug_printf. * debug.c (debug_write): New function. * debug.h (debug_write): New declaration. * linux-low.c (sigchld_handler): Call debug_write.
Diffstat (limited to 'gdb/gdbserver/ax.c')
-rw-r--r--gdb/gdbserver/ax.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/gdbserver/ax.c b/gdb/gdbserver/ax.c
index a16fba1..7b8df91 100644
--- a/gdb/gdbserver/ax.c
+++ b/gdb/gdbserver/ax.c
@@ -36,7 +36,11 @@ ax_vdebug (const char *fmt, ...)
va_start (ap, fmt);
vsprintf (buf, fmt, ap);
+#ifdef IN_PROCESS_AGENT
fprintf (stderr, PROG "/ax: %s\n", buf);
+#else
+ debug_printf (PROG "/ax: %s\n", buf);
+#endif
va_end (ap);
}