summaryrefslogtreecommitdiff
path: root/gdb/f-valprint.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2022-01-02 11:46:15 -0700
committerTom Tromey <tom@tromey.com>2022-03-29 12:46:24 -0600
commit6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a (patch)
tree641a6a86240919fe4ba9219fbbbe15bc6331c22d /gdb/f-valprint.c
parenta11ac3b3e8ff6769badcf0041894f6c5acc1b94f (diff)
downloadbinutils-gdb-6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a.tar.gz
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/f-valprint.c')
-rw-r--r--gdb/f-valprint.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c
index e10d4718833..aea01bb7dbc 100644
--- a/gdb/f-valprint.c
+++ b/gdb/f-valprint.c
@@ -212,10 +212,10 @@ public:
if (nrepeats >= m_options->repeat_count_threshold)
{
annotate_elt_rep (nrepeats + 1);
- fprintf_filtered (m_stream, "%p[<repeats %s times>%p]",
- metadata_style.style ().ptr (),
- plongest (nrepeats + 1),
- nullptr);
+ gdb_printf (m_stream, "%p[<repeats %s times>%p]",
+ metadata_style.style ().ptr (),
+ plongest (nrepeats + 1),
+ nullptr);
annotate_elt_rep_end ();
if (!repeated)
gdb_puts (" ", m_stream);
@@ -281,10 +281,10 @@ public:
if (nrepeats >= m_options->repeat_count_threshold)
{
annotate_elt_rep (nrepeats + 1);
- fprintf_filtered (m_stream, "%p[<repeats %s times>%p]",
- metadata_style.style ().ptr (),
- plongest (nrepeats + 1),
- nullptr);
+ gdb_printf (m_stream, "%p[<repeats %s times>%p]",
+ metadata_style.style ().ptr (),
+ plongest (nrepeats + 1),
+ nullptr);
annotate_elt_rep_end ();
}
else
@@ -515,7 +515,7 @@ f_language::value_print_inner (struct value *val, struct ui_file *stream,
case TYPE_CODE_NAMELIST:
/* Starting from the Fortran 90 standard, Fortran supports derived
types. */
- fprintf_filtered (stream, "( ");
+ gdb_printf (stream, "( ");
for (index = 0; index < type->num_fields (); index++)
{
struct type *field_type
@@ -557,7 +557,7 @@ f_language::value_print_inner (struct value *val, struct ui_file *stream,
++printed_field;
}
}
- fprintf_filtered (stream, " )");
+ gdb_printf (stream, " )");
break;
case TYPE_CODE_BOOL:
@@ -625,17 +625,17 @@ info_common_command_for_block (const struct block *block, const char *comname,
else
*any_printed = 1;
if (sym->print_name ())
- printf_filtered (_("Contents of F77 COMMON block '%s':\n"),
- sym->print_name ());
+ gdb_printf (_("Contents of F77 COMMON block '%s':\n"),
+ sym->print_name ());
else
- printf_filtered (_("Contents of blank COMMON block:\n"));
+ gdb_printf (_("Contents of blank COMMON block:\n"));
for (index = 0; index < common->n_entries; index++)
{
struct value *val = NULL;
- printf_filtered ("%s = ",
- common->contents[index]->print_name ());
+ gdb_printf ("%s = ",
+ common->contents[index]->print_name ());
try
{
@@ -679,7 +679,7 @@ info_common_command (const char *comname, int from_tty)
block = get_frame_block (fi, 0);
if (block == NULL)
{
- printf_filtered (_("No symbol table info available.\n"));
+ gdb_printf (_("No symbol table info available.\n"));
return;
}
@@ -696,9 +696,9 @@ info_common_command (const char *comname, int from_tty)
if (!values_printed)
{
if (comname)
- printf_filtered (_("No common block '%s'.\n"), comname);
+ gdb_printf (_("No common block '%s'.\n"), comname);
else
- printf_filtered (_("No common blocks.\n"));
+ gdb_printf (_("No common blocks.\n"));
}
}