[binutils-gdb] gdb: some additional filename styling

Andrew Burgess aburgess@sourceware.org
Thu Oct 5 11:22:02 GMT 2023


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5c18eb6bb54242d61fd03aa781e20f91c8c30d72

commit 5c18eb6bb54242d61fd03aa781e20f91c8c30d72
Author: Andrew Burgess <aburgess@redhat.com>
Date:   Fri Sep 22 11:04:44 2023 +0100

    gdb: some additional filename styling
    
    Fix up another couple of places where we can apply filename styling.
    
    Approved-By: Tom Tromey <tom@tromey.com>

Diff:
---
 gdb/source.c  | 3 ++-
 gdb/symfile.c | 5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/gdb/source.c b/gdb/source.c
index 9c701e866a6..5bdd729be8b 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -594,7 +594,8 @@ add_path (const char *dirname, char **which_path, int parse_separators)
 	      print_sys_errmsg (name, save_errno);
 	    }
 	  else if ((st.st_mode & S_IFMT) != S_IFDIR)
-	    warning (_("%s is not a directory."), name);
+	    warning (_("%ps is not a directory."),
+		     styled_string (file_name_style.style (), name));
 	}
 
     append:
diff --git a/gdb/symfile.c b/gdb/symfile.c
index cc35a5389ee..0338825d3fb 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -2488,8 +2488,9 @@ reread_symbols (int from_tty)
       if (res != 0)
 	{
 	  /* FIXME, should use print_sys_errmsg but it's not filtered.  */
-	  gdb_printf (_("`%s' has disappeared; keeping its symbols.\n"),
-		      objfile_name (objfile));
+	  gdb_printf (_("`%ps' has disappeared; keeping its symbols.\n"),
+		      styled_string (file_name_style.style (),
+				     objfile_name (objfile)));
 	  continue;
 	}
       time_t new_modtime = new_statbuf.st_mtime;


More information about the Gdb-cvs mailing list