From 9e69a2e127940cc577d4e0c6eefdfe33a31ea397 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 18 May 2024 11:35:32 -0600 Subject: 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 Reviewed-By: Keith Seitz Approved-By: Andrew Burgess --- gdb/auto-load.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'gdb/auto-load.c') 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; } -- cgit v1.1