public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
From: gdb-buildbot@sergiodj.net
To: gdb-testers@sourceware.org
Subject: [binutils-gdb] Use styled_string for "show logging filename"
Date: Thu, 03 Oct 2019 01:15:00 -0000	[thread overview]
Message-ID: <d770d56f42e77f4ee1008ae223dacd3658305297@gdb-build> (raw)

*** TEST RESULTS FOR COMMIT d770d56f42e77f4ee1008ae223dacd3658305297 ***

commit d770d56f42e77f4ee1008ae223dacd3658305297
Author:     Tom Tromey <tom@tromey.com>
AuthorDate: Thu Sep 19 07:31:28 2019 -0600
Commit:     Tom Tromey <tom@tromey.com>
CommitDate: Tue Oct 1 15:12:41 2019 -0600

    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".

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 652ba77d83..be51e38a50 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+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
diff --git a/gdb/cli/cli-logging.c b/gdb/cli/cli-logging.c
index 22b540b481..e20ebd5dc8 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 784daf2e53..123d3b076d 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+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.
diff --git a/gdb/testsuite/gdb.base/style.exp b/gdb/testsuite/gdb.base/style.exp
index 0f812f7f1b..72b5f4efb2 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]\"\\..*"
 }


             reply	other threads:[~2019-10-03  1:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-03  1:15 gdb-buildbot [this message]
2019-10-03  1:15 ` Failures on Ubuntu-Aarch64-m64, branch master gdb-buildbot
2019-10-03  3:18 ` Failures on Ubuntu-Aarch64-native-gdbserver-m64, " gdb-buildbot
2019-10-05 10:00 ` Failures on Fedora-i686, " gdb-buildbot
2019-10-05 10:47 ` Failures on Fedora-x86_64-m32, " gdb-buildbot
2019-10-05 10:52 ` Failures on Fedora-x86_64-m64, " gdb-buildbot
2019-10-05 11:39 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " gdb-buildbot
2019-10-05 11:47 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " gdb-buildbot
2019-10-05 12:38 ` Failures on Fedora-x86_64-native-gdbserver-m64, " gdb-buildbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d770d56f42e77f4ee1008ae223dacd3658305297@gdb-build \
    --to=gdb-buildbot@sergiodj.net \
    --cc=gdb-testers@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).