aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2024-10-03 16:25:05 -0600
committerTom Tromey <tom@tromey.com>2024-12-12 20:18:23 -0700
commitb5f91cd4dfbc1ef8e2ff7ce198d0f4357e20638c (patch)
tree29f6866ba137bff1bd5da754662e4215dd9e3498 /gdb/cli
parent9e69a2e127940cc577d4e0c6eefdfe33a31ea397 (diff)
downloadbinutils-b5f91cd4dfbc1ef8e2ff7ce198d0f4357e20638c.zip
binutils-b5f91cd4dfbc1ef8e2ff7ce198d0f4357e20638c.tar.gz
binutils-b5f91cd4dfbc1ef8e2ff7ce198d0f4357e20638c.tar.bz2
Replace uses of "title" style with "command"
Currently the "title" style is only used when printing command names. The "title" name itself is probably a misnomer, but meanwhile this patch changes the existing uses to instead use the new "command" style for consistency. The "title" style is not removed; see the next patch. Reviewed-By: Keith Seitz <keiths@redhat.com> Approved-By: Andrew Burgess <aburgess@redhat.com>
Diffstat (limited to 'gdb/cli')
-rw-r--r--gdb/cli/cli-decode.c16
-rw-r--r--gdb/cli/cli-script.c2
2 files changed, 9 insertions, 9 deletions
diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c
index 2951194..4fbbfcb 100644
--- a/gdb/cli/cli-decode.c
+++ b/gdb/cli/cli-decode.c
@@ -1530,7 +1530,7 @@ add_com_suppress_notification (const char *name, enum command_class theclass,
&cmdlist, suppress_notification);
}
-/* Print the prefix of C followed by name of C in title style. */
+/* Print the prefix of C followed by name of C in command style. */
static void
fput_command_name_styled (const cmd_list_element &c, struct ui_file *stream)
@@ -1538,7 +1538,7 @@ fput_command_name_styled (const cmd_list_element &c, struct ui_file *stream)
std::string prefixname
= c.prefix == nullptr ? "" : c.prefix->prefixname ();
- fprintf_styled (stream, title_style.style (), "%s%s",
+ fprintf_styled (stream, command_style.style (), "%s%s",
prefixname.c_str (), c.name);
}
@@ -2509,21 +2509,21 @@ deprecated_cmd_warning (const char *text, struct cmd_list_element *list)
if (cmd->cmd_deprecated)
gdb_printf (_("Warning: command '%ps' (%ps) is deprecated.\n"),
- styled_string (title_style.style (),
+ styled_string (command_style.style (),
tmp_cmd_str.c_str ()),
- styled_string (title_style.style (),
+ styled_string (command_style.style (),
tmp_alias_str.c_str ()));
else
gdb_printf (_("Warning: '%ps', an alias for the command '%ps', "
"is deprecated.\n"),
- styled_string (title_style.style (),
+ styled_string (command_style.style (),
tmp_alias_str.c_str ()),
- styled_string (title_style.style (),
+ styled_string (command_style.style (),
tmp_cmd_str.c_str ()));
}
else
gdb_printf (_("Warning: command '%ps' is deprecated.\n"),
- styled_string (title_style.style (),
+ styled_string (command_style.style (),
tmp_cmd_str.c_str ()));
/* Now display a second line indicating what the user should use instead.
@@ -2536,7 +2536,7 @@ deprecated_cmd_warning (const char *text, struct cmd_list_element *list)
replacement = cmd->replacement;
if (replacement != nullptr)
gdb_printf (_("Use '%ps'.\n\n"),
- styled_string (title_style.style (),
+ styled_string (command_style.style (),
replacement));
else
gdb_printf (_("No alternative known.\n\n"));
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index 329f780..9131768 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -1667,7 +1667,7 @@ show_user_1 (struct cmd_list_element *c, const char *prefix, const char *name,
gdb_printf (stream, "User %scommand \"",
c->is_prefix () ? "prefix" : "");
- fprintf_styled (stream, title_style.style (), "%s%s",
+ fprintf_styled (stream, command_style.style (), "%s%s",
prefix, name);
gdb_printf (stream, "\":\n");
if (cmdlines)