This changes "show logging filename" to style its output.
gdb/ChangeLog
2019-10-01 Tom Tromey <tom@tromey.com>
* cli/cli-logging.c (show_logging_filename): Use styled_string.
gdb/testsuite/ChangeLog
2019-10-01 Tom Tromey <tom@tromey.com>
* gdb.base/style.exp: Test "show logging filename".
+2019-10-01 Tom Tromey <tom@tromey.com>
+
+ * cli/cli-logging.c (show_logging_filename): Use styled_string.
+
2019-10-01 Tom Tromey <tom@tromey.com>
* stack.c (print_frame, info_frame_command_core): Use
#include "gdbcmd.h"
#include "ui-out.h"
#include "interps.h"
+#include "cli/cli-style.h"
static char *saved_filename;
show_logging_filename (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file, _("The current logfile is \"%s\".\n"),
- value);
+ fprintf_filtered (file, _("The current logfile is \"%ps\".\n"),
+ styled_string (file_name_style.style (), value));
}
static bool logging_overwrite;
+2019-10-01 Tom Tromey <tom@tromey.com>
+
+ * gdb.base/style.exp: Test "show logging filename".
+
2019-10-01 Tom Tromey <tom@tromey.com>
* lib/gdb-utils.exp (style): Handle "metadata" argument.
gdb_test_no_output "set print repeat 3"
gdb_test "print {0,0,0,0,0,0,0,0}" \
" = \\{0 [style {<repeats.*8.*times>} metadata]\\}"
+
+ gdb_test "show logging file" \
+ "The current logfile is \"[style .*? file]\"\\..*"
}