* dwarf2read.c (write_psymtabs_to_index): When stat fails, pass file
authorDoug Evans <dje@google.com>
Wed, 8 Dec 2010 18:26:40 +0000 (18:26 +0000)
committerDoug Evans <dje@google.com>
Wed, 8 Dec 2010 18:26:40 +0000 (18:26 +0000)
name to perror.

gdb/ChangeLog
gdb/dwarf2read.c

index 5b89470..166c116 100644 (file)
@@ -1,5 +1,8 @@
 2010-12-08  Doug Evans  <dje@google.com>
 
+       * dwarf2read.c (write_psymtabs_to_index): When stat fails, pass file
+       name to perror.
+
        * symfile.h (quick_symbol_functions): Clarify usage of
        expand_symtabs_with_filename.
        * dwarf2read.c (dw2_expand_symtabs_with_filename): Only iterate over
index 8801fb1..72e31e7 100644 (file)
@@ -15301,7 +15301,7 @@ write_psymtabs_to_index (struct objfile *objfile, const char *dir)
     error (_("Cannot use an index to create the index"));
 
   if (stat (objfile->name, &st) < 0)
-    perror_with_name (_("Could not stat"));
+    perror_with_name (objfile->name);
 
   filename = concat (dir, SLASH_STRING, lbasename (objfile->name),
                     INDEX_SUFFIX, (char *) NULL);