From 7fea6c34a1bcf11757c9d76c9d23ca5372d56501 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 24 Dec 2021 22:19:10 -0700 Subject: [PATCH] Use debug_prefixed_printf_cond_nofunc in microblaze.c This changes microblaze.c to use the standard logging macro. As a side effect, logs will now go to gdb_stdlog. This is part of PR gdb/7233. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=7233 --- gdb/microblaze-tdep.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c index e50f50d2b8c..0a2cfa2f65c 100644 --- a/gdb/microblaze-tdep.c +++ b/gdb/microblaze-tdep.c @@ -82,19 +82,10 @@ static const char * const microblaze_register_names[] = static unsigned int microblaze_debug_flag = 0; -static void ATTRIBUTE_PRINTF (1, 2) -microblaze_debug (const char *fmt, ...) -{ - if (microblaze_debug_flag) - { - va_list args; +#define microblaze_debug(fmt, ...) \ + debug_prefixed_printf_cond_nofunc (microblaze_debug_flag, "MICROBLAZE", \ + fmt, ## __VA_ARGS__) - va_start (args, fmt); - printf_unfiltered ("MICROBLAZE: "); - vprintf_unfiltered (fmt, args); - va_end (args); - } -} /* Return the name of register REGNUM. */ -- 2.30.2