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

@ -425,8 +425,8 @@ print_children (PyObject *printer, const char *hint,
/* The user won't necessarily get a stack trace here, so provide
more context. */
if (gdbpy_print_python_errors_p ())
fprintf_unfiltered (gdb_stderr,
_("Bad result from children iterator.\n"));
gdb_printf (gdb_stderr,
_("Bad result from children iterator.\n"));
gdbpy_print_stack ();
continue;
}
@ -484,7 +484,7 @@ print_children (PyObject *printer, const char *hint,
/* We print the index, not whatever the child method
returned as the name. */
if (options->print_array_indexes)
fprintf_filtered (stream, "[%d] = ", i);
gdb_printf (stream, "[%d] = ", i);
}
else if (! is_map)
{