aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui
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/tui
parenta11ac3b3e8ff6769badcf0041894f6c5acc1b94f (diff)
downloadgdb-6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a.zip
gdb-6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a.tar.gz
gdb-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/tui')
-rw-r--r--gdb/tui/tui-layout.c2
-rw-r--r--gdb/tui/tui-regs.c12
-rw-r--r--gdb/tui/tui-win.c24
3 files changed, 19 insertions, 19 deletions
diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c
index eb98e0f..6195ca1 100644
--- a/gdb/tui/tui-layout.c
+++ b/gdb/tui/tui-layout.c
@@ -818,7 +818,7 @@ tui_layout_split::specification (ui_file *output, int depth)
gdb_puts (" ", output);
first = false;
item.layout->specification (output, depth + 1);
- fprintf_unfiltered (output, " %d", item.weight);
+ gdb_printf (output, " %d", item.weight);
}
if (depth > 0)
diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c
index d53ce54..1909853 100644
--- a/gdb/tui/tui-regs.c
+++ b/gdb/tui/tui-regs.c
@@ -606,20 +606,20 @@ tui_reg_command (const char *args, int from_tty)
struct reggroup *group;
int first;
- printf_filtered (_("\"tui reg\" must be followed by the name of "
- "either a register group,\nor one of 'next' "
- "or 'prev'. Known register groups are:\n"));
+ gdb_printf (_("\"tui reg\" must be followed by the name of "
+ "either a register group,\nor one of 'next' "
+ "or 'prev'. Known register groups are:\n"));
for (first = 1, group = reggroup_next (gdbarch, NULL);
group != NULL;
first = 0, group = reggroup_next (gdbarch, group))
{
if (!first)
- printf_filtered (", ");
- printf_filtered ("%s", reggroup_name (group));
+ gdb_printf (", ");
+ gdb_printf ("%s", reggroup_name (group));
}
- printf_filtered ("\n");
+ gdb_printf ("\n");
}
}
diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c
index fd6ca59a..b95d72d 100644
--- a/gdb/tui/tui-win.c
+++ b/gdb/tui/tui-win.c
@@ -190,9 +190,9 @@ show_tui_active_border_mode (struct ui_file *file,
struct cmd_list_element *c,
const char *value)
{
- fprintf_filtered (file, _("\
+ gdb_printf (file, _("\
The attribute mode to use for the active TUI window border is \"%s\".\n"),
- value);
+ value);
}
static const char *tui_border_mode = "normal";
@@ -202,9 +202,9 @@ show_tui_border_mode (struct ui_file *file,
struct cmd_list_element *c,
const char *value)
{
- fprintf_filtered (file, _("\
+ gdb_printf (file, _("\
The attribute mode to use for the TUI window borders is \"%s\".\n"),
- value);
+ value);
}
static const char *tui_border_kind = "acs";
@@ -214,8 +214,8 @@ show_tui_border_kind (struct ui_file *file,
struct cmd_list_element *c,
const char *value)
{
- fprintf_filtered (file, _("The kind of border for TUI windows is \"%s\".\n"),
- value);
+ gdb_printf (file, _("The kind of border for TUI windows is \"%s\".\n"),
+ value);
}
@@ -332,7 +332,7 @@ static void
show_tui_resize_message (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file, _("TUI resize messaging is %s.\n"), value);
+ gdb_printf (file, _("TUI resize messaging is %s.\n"), value);
}
@@ -698,8 +698,8 @@ tui_set_focus_command (const char *arg, int from_tty)
error (_("Window \"%s\" is not visible"), arg);
tui_set_win_focus_to (win_info);
- printf_filtered (_("Focus set to %s window.\n"),
- tui_win_with_focus ()->name ());
+ gdb_printf (_("Focus set to %s window.\n"),
+ tui_win_with_focus ()->name ());
}
static void
@@ -707,7 +707,7 @@ tui_all_windows_info (const char *arg, int from_tty)
{
if (!tui_active)
{
- printf_filtered (_("The TUI is not active.\n"));
+ gdb_printf (_("The TUI is not active.\n"));
return;
}
@@ -792,7 +792,7 @@ static void
tui_show_tab_width (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file, _("TUI tab width is %s spaces.\n"), value);
+ gdb_printf (file, _("TUI tab width is %s spaces.\n"), value);
}
@@ -816,7 +816,7 @@ static void
tui_show_compact_source (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file, _("TUI source window compactness is %s.\n"), value);
+ gdb_printf (file, _("TUI source window compactness is %s.\n"), value);
}
/* Set the tab width of the specified window. */