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
This commit is contained in:
Simon Marchi
2022-01-16 21:16:02 -05:00
parent c058728c31
commit 91f94053dd
5 changed files with 48 additions and 97 deletions

View File

@@ -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