diff options
author | Tom Tromey <tom@tromey.com> | 2022-01-02 11:46:15 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2022-03-29 12:46:24 -0600 |
commit | 6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a (patch) | |
tree | 641a6a86240919fe4ba9219fbbbe15bc6331c22d /gdb/expprint.c | |
parent | a11ac3b3e8ff6769badcf0041894f6c5acc1b94f (diff) | |
download | binutils-6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a.zip binutils-6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a.tar.gz binutils-6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a.tar.bz2 |
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.
Diffstat (limited to 'gdb/expprint.c')
-rw-r--r-- | gdb/expprint.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/gdb/expprint.c b/gdb/expprint.c index 4dab3a2..cef6ffb 100644 --- a/gdb/expprint.c +++ b/gdb/expprint.c @@ -71,63 +71,63 @@ namespace expr void dump_for_expression (struct ui_file *stream, int depth, enum exp_opcode op) { - fprintf_filtered (stream, _("%*sOperation: %s\n"), depth, "", op_name (op)); + gdb_printf (stream, _("%*sOperation: %s\n"), depth, "", op_name (op)); } void dump_for_expression (struct ui_file *stream, int depth, const std::string &str) { - fprintf_filtered (stream, _("%*sString: %s\n"), depth, "", str.c_str ()); + gdb_printf (stream, _("%*sString: %s\n"), depth, "", str.c_str ()); } void dump_for_expression (struct ui_file *stream, int depth, struct type *type) { - fprintf_filtered (stream, _("%*sType: "), depth, ""); + gdb_printf (stream, _("%*sType: "), depth, ""); type_print (type, nullptr, stream, 0); - fprintf_filtered (stream, "\n"); + gdb_printf (stream, "\n"); } void dump_for_expression (struct ui_file *stream, int depth, CORE_ADDR addr) { - fprintf_filtered (stream, _("%*sConstant: %s\n"), depth, "", - core_addr_to_string (addr)); + gdb_printf (stream, _("%*sConstant: %s\n"), depth, "", + core_addr_to_string (addr)); } void dump_for_expression (struct ui_file *stream, int depth, internalvar *ivar) { - fprintf_filtered (stream, _("%*sInternalvar: $%s\n"), depth, "", - internalvar_name (ivar)); + gdb_printf (stream, _("%*sInternalvar: $%s\n"), depth, "", + internalvar_name (ivar)); } void dump_for_expression (struct ui_file *stream, int depth, symbol *sym) { - fprintf_filtered (stream, _("%*sSymbol: %s\n"), depth, "", - sym->print_name ()); + gdb_printf (stream, _("%*sSymbol: %s\n"), depth, "", + sym->print_name ()); } void dump_for_expression (struct ui_file *stream, int depth, bound_minimal_symbol msym) { - fprintf_filtered (stream, _("%*sMinsym %s in objfile %s\n"), depth, "", - msym.minsym->print_name (), objfile_name (msym.objfile)); + gdb_printf (stream, _("%*sMinsym %s in objfile %s\n"), depth, "", + msym.minsym->print_name (), objfile_name (msym.objfile)); } void dump_for_expression (struct ui_file *stream, int depth, const block *bl) { - fprintf_filtered (stream, _("%*sBlock: %p\n"), depth, "", bl); + gdb_printf (stream, _("%*sBlock: %p\n"), depth, "", bl); } void dump_for_expression (struct ui_file *stream, int depth, const block_symbol &sym) { - fprintf_filtered (stream, _("%*sBlock symbol:\n"), depth, ""); + gdb_printf (stream, _("%*sBlock symbol:\n"), depth, ""); dump_for_expression (stream, depth + 1, sym.symbol); dump_for_expression (stream, depth + 1, sym.block); } @@ -136,19 +136,19 @@ void dump_for_expression (struct ui_file *stream, int depth, type_instance_flags flags) { - fprintf_filtered (stream, _("%*sType flags: "), depth, ""); + gdb_printf (stream, _("%*sType flags: "), depth, ""); if (flags & TYPE_INSTANCE_FLAG_CONST) gdb_puts ("const ", stream); if (flags & TYPE_INSTANCE_FLAG_VOLATILE) gdb_puts ("volatile", stream); - fprintf_filtered (stream, "\n"); + gdb_printf (stream, "\n"); } void dump_for_expression (struct ui_file *stream, int depth, enum c_string_type_values flags) { - fprintf_filtered (stream, _("%*sC string flags: "), depth, ""); + gdb_printf (stream, _("%*sC string flags: "), depth, ""); switch (flags & ~C_CHAR) { case C_WIDE_STRING: @@ -176,7 +176,7 @@ void dump_for_expression (struct ui_file *stream, int depth, enum range_flag flags) { - fprintf_filtered (stream, _("%*sRange:"), depth, ""); + gdb_printf (stream, _("%*sRange:"), depth, ""); if ((flags & RANGE_LOW_BOUND_DEFAULT) != 0) gdb_puts (_("low-default "), stream); if ((flags & RANGE_HIGH_BOUND_DEFAULT) != 0) @@ -185,7 +185,7 @@ dump_for_expression (struct ui_file *stream, int depth, gdb_puts (_("high-exclusive "), stream); if ((flags & RANGE_HAS_STRIDE) != 0) gdb_puts (_("has-stride"), stream); - fprintf_filtered (stream, "\n"); + gdb_printf (stream, "\n"); } void @@ -198,9 +198,9 @@ dump_for_expression (struct ui_file *stream, int depth, void float_const_operation::dump (struct ui_file *stream, int depth) const { - fprintf_filtered (stream, _("%*sFloat: "), depth, ""); + gdb_printf (stream, _("%*sFloat: "), depth, ""); print_floating (m_data.data (), m_type, stream); - fprintf_filtered (stream, "\n"); + gdb_printf (stream, "\n"); } } /* namespace expr */ |