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.
This commit is contained in:
Tom Tromey
2022-01-02 11:46:15 -07:00
parent a11ac3b3e8
commit 6cb06a8cda
249 changed files with 8449 additions and 8463 deletions

View File

@ -159,14 +159,14 @@ pascal_language::print_one_char (int c, struct ui_file *stream,
gdb_puts ("''", stream);
}
else
fprintf_filtered (stream, "%c", c);
gdb_printf (stream, "%c", c);
}
else
{
if (*in_quotes)
gdb_puts ("'", stream);
*in_quotes = 0;
fprintf_filtered (stream, "#%d", (unsigned int) c);
gdb_printf (stream, "#%d", (unsigned int) c);
}
}
@ -291,9 +291,9 @@ pascal_language::printstr (struct ui_file *stream, struct type *elttype,
in_quotes = 0;
}
printchar (current_char, elttype, stream);
fprintf_filtered (stream, " %p[<repeats %u times>%p]",
metadata_style.style ().ptr (),
reps, nullptr);
gdb_printf (stream, " %p[<repeats %u times>%p]",
metadata_style.style ().ptr (),
reps, nullptr);
i = rep1 - 1;
things_printed += options->repeat_count_threshold;
need_comma = 1;