X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fgdbserver%2Fdebug.h;h=c136b9c224c74050dfee86d421d831547324cac9;hb=c5adaa1921c34d2b9711ec7cecd3cb4a253620db;hp=e40f28c77168dff376597523f4f943f98ce60051;hpb=1a5c25988eabb35e0e40ea484b1eea029d9b7f53;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/gdbserver/debug.h b/gdb/gdbserver/debug.h index e40f28c771..c136b9c224 100644 --- a/gdb/gdbserver/debug.h +++ b/gdb/gdbserver/debug.h @@ -19,20 +19,31 @@ #ifndef GDBSERVER_DEBUG_H #define GDBSERVER_DEBUG_H -/* We declare debug format variables here, and debug_threads but no other - debug content variables (e.g., not remote_debug) because while this file - is not currently used by IPA it may be some day, and IPA may have its own - set of debug content variables. It's ok to declare debug_threads here - because it is misnamed - a better name is debug_basic or some such, - which can work for any program, gdbserver or IPA. If/when this file is - used with IPA it is recommended to fix debug_thread's name. */ +#if !defined (IN_PROCESS_AGENT) +extern int remote_debug; + +/* Switch all debug output to DEBUG_FILE. If DEBUG_FILE is nullptr or an + empty string, or if the file cannot be opened, then debug output is sent to + stderr. */ +void debug_set_output (const char *debug_file); +#endif + +extern int using_threads; + +/* Enable miscellaneous debugging output. The name is historical - it + was originally used to debug LinuxThreads support. */ + extern int debug_threads; + extern int debug_timestamp; 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. */ +ssize_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