aboutsummaryrefslogtreecommitdiff
path: root/gdbserver/debug.h
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2022-01-16 21:16:02 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2022-01-18 13:44:38 -0500
commit91f94053dd72ea88a4d282f94836bc4c0d6c0785 (patch)
treee2dbe3514f069073026ff19152446e6763296d55 /gdbserver/debug.h
parentc058728c31684d08da396f1bf50fabaa196dc9d9 (diff)
downloadgdb-91f94053dd72ea88a4d282f94836bc4c0d6c0785.zip
gdb-91f94053dd72ea88a4d282f94836bc4c0d6c0785.tar.gz
gdb-91f94053dd72ea88a4d282f94836bc4c0d6c0785.tar.bz2
gdbserver: introduce remote_debug_printf
Add remote_debug_printf, and use it for all debug messages controlled by remote_debug. Change remote_debug to be a bool, which is trivial in this case. Change-Id: I90de13cb892faec3830047b571661822b126d6e8
Diffstat (limited to 'gdbserver/debug.h')
-rw-r--r--gdbserver/debug.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/gdbserver/debug.h b/gdbserver/debug.h
index 4220246..d924275 100644
--- a/gdbserver/debug.h
+++ b/gdbserver/debug.h
@@ -20,7 +20,13 @@
#define GDBSERVER_DEBUG_H
#if !defined (IN_PROCESS_AGENT)
-extern int remote_debug;
+extern bool remote_debug;
+
+/* Print a "remote" debug statement. */
+
+#define remote_debug_printf(fmt, ...) \
+ debug_prefixed_printf_cond (remote_debug, \
+ "remote", fmt, ##__VA_ARGS__)
/* 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