From 6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 2 Jan 2022 11:46:15 -0700 Subject: Unify gdb printf functions Now that filtered and unfiltered output can be treated identically, we can unify the printf family of functions. This is done under the name "gdb_printf". Most of this patch was written by script. --- gdb/xtensa-tdep.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'gdb/xtensa-tdep.c') diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c index f00357f..203d2e8 100644 --- a/gdb/xtensa-tdep.c +++ b/gdb/xtensa-tdep.c @@ -49,19 +49,19 @@ static unsigned int xtensa_debug_level = 0; #define DEBUGWARN(args...) \ if (xtensa_debug_level > 0) \ - fprintf_unfiltered (gdb_stdlog, "(warn ) " args) + gdb_printf (gdb_stdlog, "(warn ) " args) #define DEBUGINFO(args...) \ if (xtensa_debug_level > 1) \ - fprintf_unfiltered (gdb_stdlog, "(info ) " args) + gdb_printf (gdb_stdlog, "(info ) " args) #define DEBUGTRACE(args...) \ if (xtensa_debug_level > 2) \ - fprintf_unfiltered (gdb_stdlog, "(trace) " args) + gdb_printf (gdb_stdlog, "(trace) " args) #define DEBUGVERB(args...) \ if (xtensa_debug_level > 3) \ - fprintf_unfiltered (gdb_stdlog, "(verb ) " args) + gdb_printf (gdb_stdlog, "(verb ) " args) /* According to the ABI, the SP must be aligned to 16-byte boundaries. */ @@ -1732,23 +1732,23 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch, { struct value *arg = args[i]; struct type *arg_type = check_typedef (value_type (arg)); - fprintf_unfiltered (gdb_stdlog, "%2d: %s %3s ", i, - host_address_to_string (arg), - pulongest (TYPE_LENGTH (arg_type))); + gdb_printf (gdb_stdlog, "%2d: %s %3s ", i, + host_address_to_string (arg), + pulongest (TYPE_LENGTH (arg_type))); switch (arg_type->code ()) { case TYPE_CODE_INT: - fprintf_unfiltered (gdb_stdlog, "int"); + gdb_printf (gdb_stdlog, "int"); break; case TYPE_CODE_STRUCT: - fprintf_unfiltered (gdb_stdlog, "struct"); + gdb_printf (gdb_stdlog, "struct"); break; default: - fprintf_unfiltered (gdb_stdlog, "%3d", arg_type->code ()); + gdb_printf (gdb_stdlog, "%3d", arg_type->code ()); break; } - fprintf_unfiltered (gdb_stdlog, " %s\n", - host_address_to_string (value_contents (arg).data ())); + gdb_printf (gdb_stdlog, " %s\n", + host_address_to_string (value_contents (arg).data ())); } } -- cgit v1.1