aboutsummaryrefslogtreecommitdiff
path: root/gdb/valops.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/valops.c
parenta11ac3b3e8ff6769badcf0041894f6c5acc1b94f (diff)
downloadbinutils-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/valops.c')
-rw-r--r--gdb/valops.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/gdb/valops.c b/gdb/valops.c
index 3a59512..75d52b4 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -103,9 +103,9 @@ show_overload_resolution (struct ui_file *file, int from_tty,
struct cmd_list_element *c,
const char *value)
{
- fprintf_filtered (file, _("Overload resolution in evaluating "
- "C++ functions is %s.\n"),
- value);
+ gdb_printf (file, _("Overload resolution in evaluating "
+ "C++ functions is %s.\n"),
+ value);
}
/* Find the address of function name NAME in the inferior. If OBJF_P
@@ -3207,28 +3207,28 @@ find_oload_champ (gdb::array_view<value *> args,
if (overload_debug)
{
if (methods != NULL)
- fprintf_filtered (gdb_stderr,
- "Overloaded method instance %s, # of parms %d\n",
- methods[ix].physname, (int) parm_types.size ());
+ gdb_printf (gdb_stderr,
+ "Overloaded method instance %s, # of parms %d\n",
+ methods[ix].physname, (int) parm_types.size ());
else if (xmethods != NULL)
- fprintf_filtered (gdb_stderr,
- "Xmethod worker, # of parms %d\n",
- (int) parm_types.size ());
+ gdb_printf (gdb_stderr,
+ "Xmethod worker, # of parms %d\n",
+ (int) parm_types.size ());
else
- fprintf_filtered (gdb_stderr,
- "Overloaded function instance "
- "%s # of parms %d\n",
- functions[ix]->demangled_name (),
- (int) parm_types.size ());
+ gdb_printf (gdb_stderr,
+ "Overloaded function instance "
+ "%s # of parms %d\n",
+ functions[ix]->demangled_name (),
+ (int) parm_types.size ());
- fprintf_filtered (gdb_stderr,
- "...Badness of length : {%d, %d}\n",
- bv[0].rank, bv[0].subrank);
+ gdb_printf (gdb_stderr,
+ "...Badness of length : {%d, %d}\n",
+ bv[0].rank, bv[0].subrank);
for (jj = 1; jj < bv.size (); jj++)
- fprintf_filtered (gdb_stderr,
- "...Badness of arg %d : {%d, %d}\n",
- jj, bv[jj].rank, bv[jj].subrank);
+ gdb_printf (gdb_stderr,
+ "...Badness of arg %d : {%d, %d}\n",
+ jj, bv[jj].rank, bv[jj].subrank);
}
if (oload_champ_bv->empty ())
@@ -3256,9 +3256,9 @@ find_oload_champ (gdb::array_view<value *> args,
break;
}
if (overload_debug)
- fprintf_filtered (gdb_stderr, "Overload resolution "
- "champion is %d, ambiguous? %d\n",
- oload_champ, oload_ambiguous);
+ gdb_printf (gdb_stderr, "Overload resolution "
+ "champion is %d, ambiguous? %d\n",
+ oload_champ, oload_ambiguous);
}
return oload_champ;