diff options
author | Tom Tromey <tom@tromey.com> | 2019-09-19 07:31:28 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-10-01 15:12:41 -0600 |
commit | d770d56f42e77f4ee1008ae223dacd3658305297 (patch) | |
tree | 554ef2fe75d7d10920b89012f05b9721417f5b68 /gdb | |
parent | 9d636d67e0ddf223c6e9127dc058afdb48a7012f (diff) | |
download | binutils-d770d56f42e77f4ee1008ae223dacd3658305297.zip binutils-d770d56f42e77f4ee1008ae223dacd3658305297.tar.gz binutils-d770d56f42e77f4ee1008ae223dacd3658305297.tar.bz2 |
Use styled_string for "show logging filename"
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".
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/cli/cli-logging.c | 5 | ||||
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/style.exp | 3 |
4 files changed, 14 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 652ba77..be51e38 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 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 styled_string. * linux-thread-db.c (try_thread_db_load_1) diff --git a/gdb/cli/cli-logging.c b/gdb/cli/cli-logging.c index 22b540b..e20ebd5 100644 --- a/gdb/cli/cli-logging.c +++ b/gdb/cli/cli-logging.c @@ -21,6 +21,7 @@ #include "gdbcmd.h" #include "ui-out.h" #include "interps.h" +#include "cli/cli-style.h" static char *saved_filename; @@ -29,8 +30,8 @@ static void 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; diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 784daf2..123d3b0 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,9 @@ 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.base/style.exp: Add metadata style test. diff --git a/gdb/testsuite/gdb.base/style.exp b/gdb/testsuite/gdb.base/style.exp index 0f812f7..72b5f4e 100644 --- a/gdb/testsuite/gdb.base/style.exp +++ b/gdb/testsuite/gdb.base/style.exp @@ -137,4 +137,7 @@ save_vars { env(TERM) } { 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]\"\\..*" } |