Introduce "command" styling

This adds a new "command" style that is used when styling the name of
a gdb command.

Note that not every instance of a command name that is output by gdb
is changed here.  There is currently no way to style error() strings,
and there is no way to mark up command help strings.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31747
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Reviewed-By: Keith Seitz <keiths@redhat.com>
Approved-By: Andrew Burgess <aburgess@redhat.com>
This commit is contained in:
Tom Tromey
2024-05-18 11:35:32 -06:00
parent 62e4d4d3ad
commit 9e69a2e127
22 changed files with 143 additions and 65 deletions

View File

@@ -327,7 +327,8 @@ exec_file_locate_attach (int pid, int defer_bp_reset, int from_tty)
warning (_("No executable has been specified and target does not "
"support\n"
"determining executable automatically. "
"Try using the \"file\" command."));
"Try using the \"%ps\" command."),
styled_string (command_style.style (), "file"));
return;
}