gdb: some additional filename styling
authorAndrew Burgess <aburgess@redhat.com>
Fri, 22 Sep 2023 10:04:44 +0000 (11:04 +0100)
committerAndrew Burgess <aburgess@redhat.com>
Thu, 5 Oct 2023 11:21:45 +0000 (12:21 +0100)
Fix up another couple of places where we can apply filename styling.

Approved-By: Tom Tromey <tom@tromey.com>
gdb/source.c
gdb/symfile.c

index 9c701e866a6e0b926a7a231f8de3810a75ddbe09..5bdd729be8b75853c57f58c2866468159c507dc4 100644 (file)
@@ -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:
index cc35a5389ee34d292cfd45ad8977deb2462cdb7c..0338825d3fbcd3c777d1725bd1d722ab90a983c8 100644 (file)
@@ -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;