aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2021-12-24 22:19:10 -0700
committerTom Tromey <tom@tromey.com>2021-12-29 10:47:48 -0700
commit7fea6c34a1bcf11757c9d76c9d23ca5372d56501 (patch)
tree70883de3312170397ee3710ece9ca32d2d691795 /gdb
parent25c25f90bfe0836d7595e35548d30007c75cb0e2 (diff)
downloadbinutils-7fea6c34a1bcf11757c9d76c9d23ca5372d56501.zip
binutils-7fea6c34a1bcf11757c9d76c9d23ca5372d56501.tar.gz
binutils-7fea6c34a1bcf11757c9d76c9d23ca5372d56501.tar.bz2
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
Diffstat (limited to 'gdb')
-rw-r--r--gdb/microblaze-tdep.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c
index e50f50d..0a2cfa2 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. */