diff options
author | Tom Tromey <tom@tromey.com> | 2024-05-18 11:35:32 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2024-12-12 20:18:23 -0700 |
commit | 9e69a2e127940cc577d4e0c6eefdfe33a31ea397 (patch) | |
tree | 2cd18c8f6560a6089bf1a88de3dcb86797a3c05d /gdb/auto-load.c | |
parent | 62e4d4d3ad68fe17113069b99d80a9ee9df87cb1 (diff) | |
download | binutils-9e69a2e127940cc577d4e0c6eefdfe33a31ea397.zip binutils-9e69a2e127940cc577d4e0c6eefdfe33a31ea397.tar.gz binutils-9e69a2e127940cc577d4e0c6eefdfe33a31ea397.tar.bz2 |
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>
Diffstat (limited to 'gdb/auto-load.c')
-rw-r--r-- | gdb/auto-load.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/gdb/auto-load.c b/gdb/auto-load.c index 513c1df..a8f3a8d 100644 --- a/gdb/auto-load.c +++ b/gdb/auto-load.c @@ -477,19 +477,23 @@ file_is_auto_load_safe (const char *filename) gdb_printf (_("\ To enable execution of this file add\n\ -\tadd-auto-load-safe-path %s\n\ +\t%p[add-auto-load-safe-path %s%p]\n\ line to your configuration file \"%ps\".\n\ To completely disable this security protection add\n\ -\tset auto-load safe-path /\n\ +\t%ps\n\ line to your configuration file \"%ps\".\n\ For more information about this security protection see the\n\ \"Auto-loading safe path\" section in the GDB manual. E.g., run from the shell:\n\ \tinfo \"(gdb)Auto-loading safe path\"\n"), - filename_real.get (), - styled_string (file_name_style.style (), - home_config.c_str ()), - styled_string (file_name_style.style (), - home_config.c_str ())); + command_style.style ().ptr (), + filename_real.get (), + nullptr, + styled_string (file_name_style.style (), + home_config.c_str ()), + styled_string (command_style.style (), + "set auto-load safe-path /"), + styled_string (file_name_style.style (), + home_config.c_str ())); advice_printed = true; } |