if (debuginfod_enabled == debuginfod_ask)
{
- int resp = nquery (_("\nThis GDB supports auto-downloading debuginfo " \
- "from the following URLs:\n%s\nEnable debuginfod " \
- "for this session? "),
- urls);
+ gdb_printf (_("\nThis GDB supports auto-downloading debuginfo " \
+ "from the following URLs:\n"));
+
+ gdb::string_view url_view (urls);
+ while (true)
+ {
+ url_view = url_view.substr (url_view.find_first_not_of (' '));
+ if (url_view.empty ())
+ break;
+ size_t off = url_view.find_first_of (' ');
+ gdb_printf
+ (_(" <%ps>\n"),
+ styled_string (file_name_style.style (),
+ gdb::to_string (url_view.substr (0,
+ off)).c_str ()));
+ if (off == gdb::string_view::npos)
+ break;
+ url_view = url_view.substr (off);
+ }
+
+ int resp = nquery (_("Enable debuginfod for this session? "));
if (!resp)
{
gdb_printf (_("Debuginfod has been disabled.\nTo make this " \
The style-able objects are:
@table @code
@item filename
-Control the styling of file names. By default, this style's
+Control the styling of file names and URLs. By default, this style's
foreground color is green.
@item function
"), stream);
if (REPORT_BUGS_TO[0] && stream == gdb_stdout)
gdb_printf (stream, _("\n\
-Report bugs to %s.\n\
-"), REPORT_BUGS_TO);
+Report bugs to %ps.\n\
+"), styled_string (file_name_style.style (), REPORT_BUGS_TO));
if (stream == gdb_stdout)
gdb_printf (stream, _("\n\
You can ask GDB-related questions on the GDB users mailing list\n\
# Check that the version string is styled in the output of 'show
# version', and that this styling can be disabled.
set vers [style "GNU gdb.*" version]
- gdb_test "show version" "${vers}.*" \
- "version is styled in 'show version'"
+ set url [limited_style "http:.*html" file]
+ gdb_test "show version" "${vers}.*<$url>.*" \
+ "'show version' is styled"
}
}
there is no warranty. */
gdb_printf (stream, "\
-License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\
+License GPLv3+: GNU GPL version 3 or later <%ps>\
\nThis is free software: you are free to change and redistribute it.\n\
-There is NO WARRANTY, to the extent permitted by law.");
+There is NO WARRANTY, to the extent permitted by law.",
+ styled_string (file_name_style.style (),
+ "http://gnu.org/licenses/gpl.html"));
if (!interactive)
return;
{
gdb_printf (stream,
_("For bug reporting instructions, please see:\n"));
- gdb_printf (stream, "%s.\n", REPORT_BUGS_TO);
+ gdb_printf (stream, "%ps.\n",
+ styled_string (file_name_style.style (),
+ REPORT_BUGS_TO));
}
gdb_printf (stream,
_("Find the GDB manual and other documentation \
-resources online at:\n <http://www.gnu.org/software/gdb/documentation/>."));
+resources online at:\n <%ps>."),
+ styled_string (file_name_style.style (),
+ "http://www.gnu.org/software/gdb/documentation/"));
gdb_printf (stream, "\n\n");
gdb_printf (stream, _("For help, type \"help\".\n"));
gdb_printf (stream,
gdb_puts (_("\nThis is a bug, please report it."), gdb_stderr);
if (REPORT_BUGS_TO[0])
- gdb_printf (gdb_stderr, _(" For instructions, see:\n%s."),
- REPORT_BUGS_TO);
+ gdb_printf (gdb_stderr, _(" For instructions, see:\n%ps."),
+ styled_string (file_name_style.style (),
+ REPORT_BUGS_TO));
gdb_puts ("\n\n", gdb_stderr);
if (problem->should_dump_core == internal_problem_ask)