aboutsummaryrefslogtreecommitdiff
path: root/gdb/printcmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/printcmd.c')
-rw-r--r--gdb/printcmd.c310
1 files changed, 155 insertions, 155 deletions
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index d142408..b200ccf 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -102,10 +102,10 @@ static void
show_max_symbolic_offset (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file,
- _("The largest offset that will be "
- "printed in <symbol+1234> form is %s.\n"),
- value);
+ gdb_printf (file,
+ _("The largest offset that will be "
+ "printed in <symbol+1234> form is %s.\n"),
+ value);
}
/* Append the source filename and linenumber of the symbol when
@@ -115,9 +115,9 @@ static void
show_print_symbol_filename (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file, _("Printing of source filename and "
- "line number with <symbol> is %s.\n"),
- value);
+ gdb_printf (file, _("Printing of source filename and "
+ "line number with <symbol> is %s.\n"),
+ value);
}
/* Number of auto-display expression currently being displayed.
@@ -569,7 +569,7 @@ print_address_symbolic (struct gdbarch *gdbarch, CORE_ADDR addr,
gdb_puts ("<", stream);
fputs_styled (name.c_str (), function_name_style.style (), stream);
if (offset != 0)
- fprintf_filtered (stream, "%+d", offset);
+ gdb_printf (stream, "%+d", offset);
/* Append source filename and line number if desired. Give specific
line # of this addr, if we have it; else line # of the nearest symbol. */
@@ -578,7 +578,7 @@ print_address_symbolic (struct gdbarch *gdbarch, CORE_ADDR addr,
gdb_puts (line == -1 ? " in " : " at ", stream);
fputs_styled (filename.c_str (), file_name_style.style (), stream);
if (line != -1)
- fprintf_filtered (stream, ":%d", line);
+ gdb_printf (stream, ":%d", line);
}
if (unmapped)
gdb_puts ("*>", stream);
@@ -819,11 +819,11 @@ find_instruction_backward (struct gdbarch *gdbarch, CORE_ADDR addr,
/* We reach here when line info is not available. In this case,
we print a message and just exit the loop. The return value
is calculated after the loop. */
- printf_filtered (_("No line number information available "
- "for address "));
+ gdb_printf (_("No line number information available "
+ "for address "));
gdb_stdout->wrap_here (2);
print_address (gdbarch, loop_start - 1, gdb_stdout);
- printf_filtered ("\n");
+ gdb_printf ("\n");
break;
}
@@ -905,8 +905,8 @@ read_memory_backward (struct gdbarch *gdbarch,
if (errcode != 0)
{
/* The read was unsuccessful, so exit the loop. */
- printf_filtered (_("Cannot access memory at address %s\n"),
- paddress (gdbarch, memaddr));
+ gdb_printf (_("Cannot access memory at address %s\n"),
+ paddress (gdbarch, memaddr));
break;
}
}
@@ -1140,10 +1140,10 @@ do_examine (struct format_data fmt, struct gdbarch *gdbarch, CORE_ADDR addr)
if (!atag.empty ())
{
- printf_filtered (_("<Allocation Tag %s for range [%s,%s)>\n"),
- atag.c_str (),
- paddress (gdbarch, tag_laddr),
- paddress (gdbarch, tag_haddr));
+ gdb_printf (_("<Allocation Tag %s for range [%s,%s)>\n"),
+ atag.c_str (),
+ paddress (gdbarch, tag_laddr),
+ paddress (gdbarch, tag_haddr));
}
}
print_range_tag = false;
@@ -1152,12 +1152,12 @@ do_examine (struct format_data fmt, struct gdbarch *gdbarch, CORE_ADDR addr)
if (format == 'i')
gdb_puts (pc_prefix (next_address));
print_address (next_gdbarch, next_address, gdb_stdout);
- printf_filtered (":");
+ gdb_printf (":");
for (i = maxelts;
i > 0 && count > 0;
i--, count--)
{
- printf_filtered ("\t");
+ gdb_printf ("\t");
/* Note that print_formatted sets next_address for the next
object. */
last_examine_address = next_address;
@@ -1185,7 +1185,7 @@ do_examine (struct format_data fmt, struct gdbarch *gdbarch, CORE_ADDR addr)
if (tag_haddr <= next_address)
print_range_tag = true;
}
- printf_filtered ("\n");
+ gdb_printf ("\n");
}
if (need_to_update_next_address)
@@ -1246,12 +1246,12 @@ print_value (value *val, const value_print_options &opts)
annotate_value_history_begin (histindex, value_type (val));
- printf_filtered ("$%d = ", histindex);
+ gdb_printf ("$%d = ", histindex);
annotate_value_history_value ();
print_formatted (val, 0, &opts, gdb_stdout);
- printf_filtered ("\n");
+ gdb_printf ("\n");
annotate_value_history_end ();
}
@@ -1343,9 +1343,9 @@ print_command_1 (const char *args, int voidprint)
std::string atag
= gdbarch_memtag_to_string (target_gdbarch (), tag);
- printf_filtered (_("Logical tag (%s) does not match the "
- "allocation tag (%s).\n"),
- ltag.c_str (), atag.c_str ());
+ gdb_printf (_("Logical tag (%s) does not match the "
+ "allocation tag (%s).\n"),
+ ltag.c_str (), atag.c_str ());
}
}
catch (gdb_exception_error &ex)
@@ -1353,9 +1353,9 @@ print_command_1 (const char *args, int voidprint)
if (ex.error == TARGET_CLOSE_ERROR)
throw;
- fprintf_filtered (gdb_stderr,
- _("Could not validate memory tag: %s\n"),
- ex.message->c_str ());
+ gdb_printf (gdb_stderr,
+ _("Could not validate memory tag: %s\n"),
+ ex.message->c_str ());
}
}
@@ -1574,41 +1574,41 @@ info_symbol_command (const char *arg, int from_tty)
if (current_program_space->multi_objfile_p ())
if (pc_in_unmapped_range (addr, osect))
if (section_is_overlay (osect))
- printf_filtered (_("%s in load address range of "
- "%s overlay section %s of %s\n"),
- loc_string, mapped, sec_name, obj_name);
+ gdb_printf (_("%s in load address range of "
+ "%s overlay section %s of %s\n"),
+ loc_string, mapped, sec_name, obj_name);
else
- printf_filtered (_("%s in load address range of "
- "section %s of %s\n"),
- loc_string, sec_name, obj_name);
+ gdb_printf (_("%s in load address range of "
+ "section %s of %s\n"),
+ loc_string, sec_name, obj_name);
else
if (section_is_overlay (osect))
- printf_filtered (_("%s in %s overlay section %s of %s\n"),
- loc_string, mapped, sec_name, obj_name);
+ gdb_printf (_("%s in %s overlay section %s of %s\n"),
+ loc_string, mapped, sec_name, obj_name);
else
- printf_filtered (_("%s in section %s of %s\n"),
- loc_string, sec_name, obj_name);
+ gdb_printf (_("%s in section %s of %s\n"),
+ loc_string, sec_name, obj_name);
else
if (pc_in_unmapped_range (addr, osect))
if (section_is_overlay (osect))
- printf_filtered (_("%s in load address range of %s overlay "
- "section %s\n"),
- loc_string, mapped, sec_name);
+ gdb_printf (_("%s in load address range of %s overlay "
+ "section %s\n"),
+ loc_string, mapped, sec_name);
else
- printf_filtered
+ gdb_printf
(_("%s in load address range of section %s\n"),
loc_string, sec_name);
else
if (section_is_overlay (osect))
- printf_filtered (_("%s in %s overlay section %s\n"),
- loc_string, mapped, sec_name);
+ gdb_printf (_("%s in %s overlay section %s\n"),
+ loc_string, mapped, sec_name);
else
- printf_filtered (_("%s in section %s\n"),
- loc_string, sec_name);
+ gdb_printf (_("%s in section %s\n"),
+ loc_string, sec_name);
}
}
if (matches == 0)
- printf_filtered (_("No symbol matches %s.\n"), arg);
+ gdb_printf (_("No symbol matches %s.\n"), arg);
}
static void
@@ -1632,14 +1632,14 @@ info_address_command (const char *exp, int from_tty)
{
if (is_a_field_of_this.type != NULL)
{
- printf_filtered ("Symbol \"");
+ gdb_printf ("Symbol \"");
fprintf_symbol_filtered (gdb_stdout, exp,
current_language->la_language, DMGL_ANSI);
- printf_filtered ("\" is a field of the local class variable ");
+ gdb_printf ("\" is a field of the local class variable ");
if (current_language->la_language == language_objc)
- printf_filtered ("`self'\n"); /* ObjC equivalent of "this" */
+ gdb_printf ("`self'\n"); /* ObjC equivalent of "this" */
else
- printf_filtered ("`this'\n");
+ gdb_printf ("`this'\n");
return;
}
@@ -1652,34 +1652,34 @@ info_address_command (const char *exp, int from_tty)
gdbarch = objfile->arch ();
load_addr = BMSYMBOL_VALUE_ADDRESS (msymbol);
- printf_filtered ("Symbol \"");
+ gdb_printf ("Symbol \"");
fprintf_symbol_filtered (gdb_stdout, exp,
current_language->la_language, DMGL_ANSI);
- printf_filtered ("\" is at ");
+ gdb_printf ("\" is at ");
fputs_styled (paddress (gdbarch, load_addr), address_style.style (),
gdb_stdout);
- printf_filtered (" in a file compiled without debugging");
+ gdb_printf (" in a file compiled without debugging");
section = msymbol.minsym->obj_section (objfile);
if (section_is_overlay (section))
{
load_addr = overlay_unmapped_address (load_addr, section);
- printf_filtered (",\n -- loaded at ");
+ gdb_printf (",\n -- loaded at ");
fputs_styled (paddress (gdbarch, load_addr),
address_style.style (),
gdb_stdout);
- printf_filtered (" in overlay section %s",
- section->the_bfd_section->name);
+ gdb_printf (" in overlay section %s",
+ section->the_bfd_section->name);
}
- printf_filtered (".\n");
+ gdb_printf (".\n");
}
else
error (_("No symbol \"%s\" in current context."), exp);
return;
}
- printf_filtered ("Symbol \"");
+ gdb_printf ("Symbol \"");
gdb_puts (sym->print_name ());
- printf_filtered ("\" is ");
+ gdb_printf ("\" is ");
val = SYMBOL_VALUE (sym);
if (sym->is_objfile_owned ())
section = sym->obj_section (symbol_objfile (sym));
@@ -1691,7 +1691,7 @@ info_address_command (const char *exp, int from_tty)
{
SYMBOL_COMPUTED_OPS (sym)->describe_location (sym, context_pc,
gdb_stdout);
- printf_filtered (".\n");
+ gdb_printf (".\n");
return;
}
@@ -1699,22 +1699,22 @@ info_address_command (const char *exp, int from_tty)
{
case LOC_CONST:
case LOC_CONST_BYTES:
- printf_filtered ("constant");
+ gdb_printf ("constant");
break;
case LOC_LABEL:
- printf_filtered ("a label at address ");
+ gdb_printf ("a label at address ");
load_addr = SYMBOL_VALUE_ADDRESS (sym);
fputs_styled (paddress (gdbarch, load_addr), address_style.style (),
gdb_stdout);
if (section_is_overlay (section))
{
load_addr = overlay_unmapped_address (load_addr, section);
- printf_filtered (",\n -- loaded at ");
+ gdb_printf (",\n -- loaded at ");
fputs_styled (paddress (gdbarch, load_addr), address_style.style (),
gdb_stdout);
- printf_filtered (" in overlay section %s",
- section->the_bfd_section->name);
+ gdb_printf (" in overlay section %s",
+ section->the_bfd_section->name);
}
break;
@@ -1731,65 +1731,65 @@ info_address_command (const char *exp, int from_tty)
regno = SYMBOL_REGISTER_OPS (sym)->register_number (sym, gdbarch);
if (sym->is_argument ())
- printf_filtered (_("an argument in register %s"),
- gdbarch_register_name (gdbarch, regno));
+ gdb_printf (_("an argument in register %s"),
+ gdbarch_register_name (gdbarch, regno));
else
- printf_filtered (_("a variable in register %s"),
- gdbarch_register_name (gdbarch, regno));
+ gdb_printf (_("a variable in register %s"),
+ gdbarch_register_name (gdbarch, regno));
break;
case LOC_STATIC:
- printf_filtered (_("static storage at address "));
+ gdb_printf (_("static storage at address "));
load_addr = SYMBOL_VALUE_ADDRESS (sym);
fputs_styled (paddress (gdbarch, load_addr), address_style.style (),
gdb_stdout);
if (section_is_overlay (section))
{
load_addr = overlay_unmapped_address (load_addr, section);
- printf_filtered (_(",\n -- loaded at "));
+ gdb_printf (_(",\n -- loaded at "));
fputs_styled (paddress (gdbarch, load_addr), address_style.style (),
gdb_stdout);
- printf_filtered (_(" in overlay section %s"),
- section->the_bfd_section->name);
+ gdb_printf (_(" in overlay section %s"),
+ section->the_bfd_section->name);
}
break;
case LOC_REGPARM_ADDR:
/* Note comment at LOC_REGISTER. */
regno = SYMBOL_REGISTER_OPS (sym)->register_number (sym, gdbarch);
- printf_filtered (_("address of an argument in register %s"),
- gdbarch_register_name (gdbarch, regno));
+ gdb_printf (_("address of an argument in register %s"),
+ gdbarch_register_name (gdbarch, regno));
break;
case LOC_ARG:
- printf_filtered (_("an argument at offset %ld"), val);
+ gdb_printf (_("an argument at offset %ld"), val);
break;
case LOC_LOCAL:
- printf_filtered (_("a local variable at frame offset %ld"), val);
+ gdb_printf (_("a local variable at frame offset %ld"), val);
break;
case LOC_REF_ARG:
- printf_filtered (_("a reference argument at offset %ld"), val);
+ gdb_printf (_("a reference argument at offset %ld"), val);
break;
case LOC_TYPEDEF:
- printf_filtered (_("a typedef"));
+ gdb_printf (_("a typedef"));
break;
case LOC_BLOCK:
- printf_filtered (_("a function at address "));
+ gdb_printf (_("a function at address "));
load_addr = BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (sym));
fputs_styled (paddress (gdbarch, load_addr), address_style.style (),
gdb_stdout);
if (section_is_overlay (section))
{
load_addr = overlay_unmapped_address (load_addr, section);
- printf_filtered (_(",\n -- loaded at "));
+ gdb_printf (_(",\n -- loaded at "));
fputs_styled (paddress (gdbarch, load_addr), address_style.style (),
gdb_stdout);
- printf_filtered (_(" in overlay section %s"),
- section->the_bfd_section->name);
+ gdb_printf (_(" in overlay section %s"),
+ section->the_bfd_section->name);
}
break;
@@ -1799,7 +1799,7 @@ info_address_command (const char *exp, int from_tty)
msym = lookup_bound_minimal_symbol (sym->linkage_name ());
if (msym.minsym == NULL)
- printf_filtered ("unresolved");
+ gdb_printf ("unresolved");
else
{
section = msym.obj_section ();
@@ -1808,26 +1808,26 @@ info_address_command (const char *exp, int from_tty)
&& (section->the_bfd_section->flags & SEC_THREAD_LOCAL) != 0)
{
load_addr = MSYMBOL_VALUE_RAW_ADDRESS (msym.minsym);
- printf_filtered (_("a thread-local variable at offset %s "
- "in the thread-local storage for `%s'"),
- paddress (gdbarch, load_addr),
- objfile_name (section->objfile));
+ gdb_printf (_("a thread-local variable at offset %s "
+ "in the thread-local storage for `%s'"),
+ paddress (gdbarch, load_addr),
+ objfile_name (section->objfile));
}
else
{
load_addr = BMSYMBOL_VALUE_ADDRESS (msym);
- printf_filtered (_("static storage at address "));
+ gdb_printf (_("static storage at address "));
fputs_styled (paddress (gdbarch, load_addr),
address_style.style (), gdb_stdout);
if (section_is_overlay (section))
{
load_addr = overlay_unmapped_address (load_addr, section);
- printf_filtered (_(",\n -- loaded at "));
+ gdb_printf (_(",\n -- loaded at "));
fputs_styled (paddress (gdbarch, load_addr),
address_style.style (),
gdb_stdout);
- printf_filtered (_(" in overlay section %s"),
- section->the_bfd_section->name);
+ gdb_printf (_(" in overlay section %s"),
+ section->the_bfd_section->name);
}
}
}
@@ -1835,14 +1835,14 @@ info_address_command (const char *exp, int from_tty)
break;
case LOC_OPTIMIZED_OUT:
- printf_filtered (_("optimized out"));
+ gdb_printf (_("optimized out"));
break;
default:
- printf_filtered (_("of unknown (botched) type"));
+ gdb_printf (_("of unknown (botched) type"));
break;
}
- printf_filtered (".\n");
+ gdb_printf (".\n");
}
@@ -2053,7 +2053,7 @@ map_display_numbers (const char *args,
return item->number == num;
});
if (iter == all_displays.end ())
- printf_filtered (_("No display number %d.\n"), num);
+ gdb_printf (_("No display number %d.\n"), num);
else
function (iter->get ());
}
@@ -2138,21 +2138,21 @@ do_one_display (struct display *d)
= make_scoped_restore (&current_display_number, d->number);
annotate_display_begin ();
- printf_filtered ("%d", d->number);
+ gdb_printf ("%d", d->number);
annotate_display_number_end ();
- printf_filtered (": ");
+ gdb_printf (": ");
if (d->format.size)
{
annotate_display_format ();
- printf_filtered ("x/");
+ gdb_printf ("x/");
if (d->format.count != 1)
- printf_filtered ("%d", d->format.count);
- printf_filtered ("%c", d->format.format);
+ gdb_printf ("%d", d->format.count);
+ gdb_printf ("%c", d->format.format);
if (d->format.format != 'i' && d->format.format != 's')
- printf_filtered ("%c", d->format.size);
- printf_filtered (" ");
+ gdb_printf ("%c", d->format.size);
+ gdb_printf (" ");
annotate_display_expression ();
@@ -2160,9 +2160,9 @@ do_one_display (struct display *d)
annotate_display_expression_end ();
if (d->format.count != 1 || d->format.format == 'i')
- printf_filtered ("\n");
+ gdb_printf ("\n");
else
- printf_filtered (" ");
+ gdb_printf (" ");
annotate_display_value ();
@@ -2179,9 +2179,9 @@ do_one_display (struct display *d)
}
catch (const gdb_exception_error &ex)
{
- printf_filtered (_("%p[<error: %s>%p]\n"),
- metadata_style.style ().ptr (), ex.what (),
- nullptr);
+ gdb_printf (_("%p[<error: %s>%p]\n"),
+ metadata_style.style ().ptr (), ex.what (),
+ nullptr);
}
}
else
@@ -2191,14 +2191,14 @@ do_one_display (struct display *d)
annotate_display_format ();
if (d->format.format)
- printf_filtered ("/%c ", d->format.format);
+ gdb_printf ("/%c ", d->format.format);
annotate_display_expression ();
gdb_puts (d->exp_string.c_str ());
annotate_display_expression_end ();
- printf_filtered (" = ");
+ gdb_printf (" = ");
annotate_display_expression ();
@@ -2218,7 +2218,7 @@ do_one_display (struct display *d)
_("<error: %s>"), ex.what ());
}
- printf_filtered ("\n");
+ gdb_printf ("\n");
}
annotate_display_end ();
@@ -2248,7 +2248,7 @@ disable_display (int num)
d->enabled_p = false;
return;
}
- printf_filtered (_("No display number %d.\n"), num);
+ gdb_printf (_("No display number %d.\n"), num);
}
void
@@ -2257,10 +2257,10 @@ disable_current_display (void)
if (current_display_number >= 0)
{
disable_display (current_display_number);
- fprintf_unfiltered (gdb_stderr,
- _("Disabling display %d to "
- "avoid infinite recursion.\n"),
- current_display_number);
+ gdb_printf (gdb_stderr,
+ _("Disabling display %d to "
+ "avoid infinite recursion.\n"),
+ current_display_number);
}
current_display_number = -1;
}
@@ -2269,23 +2269,23 @@ static void
info_display_command (const char *ignore, int from_tty)
{
if (all_displays.empty ())
- printf_filtered (_("There are no auto-display expressions now.\n"));
+ gdb_printf (_("There are no auto-display expressions now.\n"));
else
- printf_filtered (_("Auto-display expressions now in effect:\n\
+ gdb_printf (_("Auto-display expressions now in effect:\n\
Num Enb Expression\n"));
for (auto &d : all_displays)
{
- printf_filtered ("%d: %c ", d->number, "ny"[(int) d->enabled_p]);
+ gdb_printf ("%d: %c ", d->number, "ny"[(int) d->enabled_p]);
if (d->format.size)
- printf_filtered ("/%d%c%c ", d->format.count, d->format.size,
- d->format.format);
+ gdb_printf ("/%d%c%c ", d->format.count, d->format.size,
+ d->format.format);
else if (d->format.format)
- printf_filtered ("/%c ", d->format.format);
+ gdb_printf ("/%c ", d->format.format);
gdb_puts (d->exp_string.c_str ());
if (d->block && !contained_in (get_selected_block (0), d->block, true))
- printf_filtered (_(" (cannot be evaluated in the current context)"));
- printf_filtered ("\n");
+ gdb_printf (_(" (cannot be evaluated in the current context)"));
+ gdb_printf ("\n");
}
}
@@ -2388,8 +2388,8 @@ print_variable_and_value (const char *name, struct symbol *var,
if (!name)
name = var->print_name ();
- fprintf_filtered (stream, "%*s%ps = ", 2 * indent, "",
- styled_string (variable_name_style.style (), name));
+ gdb_printf (stream, "%*s%ps = ", 2 * indent, "",
+ styled_string (variable_name_style.style (), name));
try
{
@@ -2416,7 +2416,7 @@ print_variable_and_value (const char *name, struct symbol *var,
except.what ());
}
- fprintf_filtered (stream, "\n");
+ gdb_printf (stream, "\n");
}
/* Subroutine of ui_printf to simplify it.
@@ -2454,7 +2454,7 @@ printf_c_string (struct ui_file *stream, const char *format,
{
DIAGNOSTIC_PUSH
DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL
- fprintf_filtered (stream, format, "(null)");
+ gdb_printf (stream, format, "(null)");
DIAGNOSTIC_POP
return;
}
@@ -2483,7 +2483,7 @@ printf_c_string (struct ui_file *stream, const char *format,
DIAGNOSTIC_PUSH
DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL
- fprintf_filtered (stream, format, (char *) str);
+ gdb_printf (stream, format, (char *) str);
DIAGNOSTIC_POP
}
@@ -2517,7 +2517,7 @@ printf_wide_c_string (struct ui_file *stream, const char *format,
{
DIAGNOSTIC_PUSH
DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL
- fprintf_filtered (stream, format, "(null)");
+ gdb_printf (stream, format, "(null)");
DIAGNOSTIC_POP
return;
}
@@ -2553,7 +2553,7 @@ printf_wide_c_string (struct ui_file *stream, const char *format,
DIAGNOSTIC_PUSH
DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL
- fprintf_filtered (stream, format, obstack_base (&output));
+ gdb_printf (stream, format, obstack_base (&output));
DIAGNOSTIC_POP
}
@@ -2685,7 +2685,7 @@ printf_pointer (struct ui_file *stream, const char *format,
*fmt_p++ = '\0';
DIAGNOSTIC_PUSH
DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL
- fprintf_filtered (stream, fmt, val);
+ gdb_printf (stream, fmt, val);
DIAGNOSTIC_POP
}
else
@@ -2694,7 +2694,7 @@ printf_pointer (struct ui_file *stream, const char *format,
*fmt_p++ = '\0';
DIAGNOSTIC_PUSH
DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL
- fprintf_filtered (stream, fmt, "(nil)");
+ gdb_printf (stream, fmt, "(nil)");
DIAGNOSTIC_POP
}
}
@@ -2797,8 +2797,8 @@ ui_printf (const char *arg, struct ui_file *stream)
DIAGNOSTIC_PUSH
DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL
- fprintf_filtered (stream, current_substring,
- obstack_base (&output));
+ gdb_printf (stream, current_substring,
+ obstack_base (&output));
DIAGNOSTIC_POP
}
break;
@@ -2809,7 +2809,7 @@ ui_printf (const char *arg, struct ui_file *stream)
DIAGNOSTIC_PUSH
DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL
- fprintf_filtered (stream, current_substring, val);
+ gdb_printf (stream, current_substring, val);
DIAGNOSTIC_POP
break;
}
@@ -2822,7 +2822,7 @@ ui_printf (const char *arg, struct ui_file *stream)
DIAGNOSTIC_PUSH
DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL
- fprintf_filtered (stream, current_substring, val);
+ gdb_printf (stream, current_substring, val);
DIAGNOSTIC_POP
break;
}
@@ -2832,7 +2832,7 @@ ui_printf (const char *arg, struct ui_file *stream)
DIAGNOSTIC_PUSH
DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL
- fprintf_filtered (stream, current_substring, val);
+ gdb_printf (stream, current_substring, val);
DIAGNOSTIC_POP
break;
}
@@ -2842,7 +2842,7 @@ ui_printf (const char *arg, struct ui_file *stream)
DIAGNOSTIC_PUSH
DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL
- fprintf_filtered (stream, current_substring, val);
+ gdb_printf (stream, current_substring, val);
DIAGNOSTIC_POP
break;
}
@@ -2862,14 +2862,14 @@ ui_printf (const char *arg, struct ui_file *stream)
/* Print a portion of the format string that has no
directives. Note that this will not include any
ordinary %-specs, but it might include "%%". That is
- why we use printf_filtered and not gdb_puts here.
+ why we use gdb_printf and not gdb_puts here.
Also, we pass a dummy argument because some platforms
have modified GCC to include -Wformat-security by
default, which will warn here if there is no
argument. */
DIAGNOSTIC_PUSH
DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL
- fprintf_filtered (stream, current_substring, 0);
+ gdb_printf (stream, current_substring, 0);
DIAGNOSTIC_POP
break;
default:
@@ -2961,9 +2961,9 @@ memory_tag_print_tag_command (const char *args, enum memtag_type tag_type)
std::string tag = gdbarch_memtag_to_string (target_gdbarch (), tag_value);
if (tag.empty ())
- printf_filtered (_("%s tag unavailable.\n"),
- tag_type
- == memtag_type::logical? "Logical" : "Allocation");
+ gdb_printf (_("%s tag unavailable.\n"),
+ tag_type
+ == memtag_type::logical? "Logical" : "Allocation");
struct value *v_tag = process_print_command_args (tag.c_str (),
&print_opts,
@@ -3059,7 +3059,7 @@ memory_tag_with_logical_tag_command (const char *args, int from_tty)
/* Length doesn't matter for a logical tag. Pass 0. */
if (!gdbarch_set_memtags (target_gdbarch (), val, 0, tags,
memtag_type::logical))
- printf_filtered (_("Could not update the logical tag data.\n"));
+ gdb_printf (_("Could not update the logical tag data.\n"));
else
{
/* Always print it in hex format. */
@@ -3136,9 +3136,9 @@ memory_tag_set_allocation_tag_command (const char *args, int from_tty)
if (!gdbarch_set_memtags (target_gdbarch (), val, length, tags,
memtag_type::allocation))
- printf_filtered (_("Could not update the allocation tag(s).\n"));
+ gdb_printf (_("Could not update the allocation tag(s).\n"));
else
- printf_filtered (_("Allocation tag(s) updated successfully.\n"));
+ gdb_printf (_("Allocation tag(s) updated successfully.\n"));
}
/* Implement the "memory-tag check" command. */
@@ -3178,10 +3178,10 @@ memory_tag_check_command (const char *args, int from_tty)
std::string atag
= gdbarch_memtag_to_string (target_gdbarch (), tag);
- printf_filtered (_("Logical tag (%s) does not match"
- " the allocation tag (%s) for address %s.\n"),
- ltag.c_str (), atag.c_str (),
- paddress (target_gdbarch (), addr));
+ gdb_printf (_("Logical tag (%s) does not match"
+ " the allocation tag (%s) for address %s.\n"),
+ ltag.c_str (), atag.c_str (),
+ paddress (target_gdbarch (), addr));
}
else
{
@@ -3190,8 +3190,8 @@ memory_tag_check_command (const char *args, int from_tty)
std::string ltag
= gdbarch_memtag_to_string (target_gdbarch (), tag);
- printf_filtered (_("Memory tags for address %s match (%s).\n"),
- paddress (target_gdbarch (), addr), ltag.c_str ());
+ gdb_printf (_("Memory tags for address %s match (%s).\n"),
+ paddress (target_gdbarch (), addr), ltag.c_str ());
}
}