[gdb/testsuite] Fix gdb.dwarf2/locexpr-data-member-location.exp with nopie
[binutils-gdb.git] / gdb / auto-load.c
index 057104d97b081c7aa3780823312aaf801cc18359..b6056f5d60a957b0c19ae87e79d8cc866eb742c8 100644 (file)
@@ -733,8 +733,8 @@ auto_load_objfile_script_1 (struct objfile *objfile, const char *realname,
   gdb_file_up input = gdb_fopen_cloexec (filename.c_str (), "r");
   debugfile = filename.c_str ();
 
-  auto_load_debug_printf ("Attempted file \"%s\" %s.",
-                         debugfile,
+  auto_load_debug_printf ("Attempted file \"%ps\" %s.",
+                         styled_string (file_name_style.style (), debugfile),
                          input != nullptr ? "exists" : "does not exist");
 
   std::string debugfile_holder;
@@ -763,8 +763,9 @@ auto_load_objfile_script_1 (struct objfile *objfile, const char *realname,
 
          input = gdb_fopen_cloexec (debugfile, "r");
 
-         auto_load_debug_printf ("Attempted file \"%s\" %s.",
-                                 debugfile,
+         auto_load_debug_printf ("Attempted file \"%ps\" %s.",
+                                 styled_string (file_name_style.style (),
+                                                debugfile),
                                  (input != nullptr
                                   ? "exists"
                                   : "does not exist"));