From c68665c7260985ac8497ccafcea961f4a261c675 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Sun, 16 Jan 2022 21:21:24 -0500 Subject: gdbserver: turn debug_threads into a boolean debug_threads is always used as a boolean. Except in ax.cc and tracepoint.cc. These files have their own macros that use debug_threads, and have a concept of verbosity level. But they both have a single level, so it's just a boolean in the end. Remove this concept of level. If we ever want to re-introduce it, I think it will be better implemented in a more common location. Change debug_threads to bool and adjust some users that were treating it as an int. Change-Id: I137f596eaf763a08c977dd74417969cedfee9ecf --- gdbserver/tracepoint.cc | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'gdbserver/tracepoint.cc') diff --git a/gdbserver/tracepoint.cc b/gdbserver/tracepoint.cc index 8ccdf49..0136f6e 100644 --- a/gdbserver/tracepoint.cc +++ b/gdbserver/tracepoint.cc @@ -77,17 +77,17 @@ trace_vdebug (const char *fmt, ...) va_end (ap); } -#define trace_debug_1(level, fmt, args...) \ +#define trace_debug(fmt, args...) \ do { \ - if (level <= debug_threads) \ + if (debug_threads) \ trace_vdebug ((fmt), ##args); \ } while (0) #else -#define trace_debug_1(level, fmt, args...) \ +#define trace_debug(fmt, args...) \ do { \ - if (level <= debug_threads) \ + if (debug_threads) \ { \ debug_printf ((fmt), ##args); \ debug_printf ("\n"); \ @@ -96,9 +96,6 @@ trace_vdebug (const char *fmt, ...) #endif -#define trace_debug(FMT, args...) \ - trace_debug_1 (1, FMT, ##args) - /* Prefix exported symbols, for good citizenship. All the symbols that need exporting are defined in this module. Note that all these symbols must be tagged with IP_AGENT_EXPORT_*. */ -- cgit v1.1