diff options
author | Alan Hayward <alan.hayward@arm.com> | 2019-04-16 10:37:47 +0100 |
---|---|---|
committer | Alan Hayward <alan.hayward@arm.com> | 2019-04-17 10:42:46 +0100 |
commit | a7e559cc087b10b9ea337b58e52cc13964aae3fb (patch) | |
tree | 9d37b96a5ec1c3c53df5d92c2f2d86fcad65523c /gdb/gdbserver/debug.h | |
parent | aeb2e706e1b9c491d20c88c8ead1ae9df9cee04a (diff) | |
download | fsf-binutils-gdb-a7e559cc087b10b9ea337b58e52cc13964aae3fb.zip fsf-binutils-gdb-a7e559cc087b10b9ea337b58e52cc13964aae3fb.tar.gz fsf-binutils-gdb-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/debug.h')
-rw-r--r-- | gdb/gdbserver/debug.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/gdbserver/debug.h b/gdb/gdbserver/debug.h index f65c91c..29e58ad 100644 --- a/gdb/gdbserver/debug.h +++ b/gdb/gdbserver/debug.h @@ -35,6 +35,9 @@ void debug_flush (void); void do_debug_enter (const char *function_name); void do_debug_exit (const char *function_name); +/* Async signal safe debug output function that calls write directly. */ +size_t debug_write (const void *buf, size_t nbyte); + /* These macros are for use in major functions that produce a lot of debugging output. They help identify in the mass of debugging output when these functions enter and exit. debug_enter is intended to be |