* dwarf2read.c (dw2_find_symbol_file): Initialize filename before
authorDoug Evans <dje@google.com>
Tue, 30 Apr 2013 21:11:50 +0000 (21:11 +0000)
committerDoug Evans <dje@google.com>
Tue, 30 Apr 2013 21:11:50 +0000 (21:11 +0000)
calling init_cutu_and_read_dies.

gdb/ChangeLog
gdb/dwarf2read.c

index 3e450e39085beb6cdd471685154f699d694fa212..16f4357d666a023a530c399b0740c52e6293b30f 100644 (file)
@@ -1,3 +1,8 @@
+2013-04-30  Doug Evans  <dje@google.com>
+
+       * dwarf2read.c (dw2_find_symbol_file): Initialize filename before
+       calling init_cutu_and_read_dies.
+
 2013-03-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
 
        * target-descriptions.c (maint_print_c_tdesc_cmd):
index 8dcf9719cbde129f1daac4a21958989e22a0fe47..f640a40fe2a646f505fca15a2619dcd471b1458f 100644 (file)
@@ -3465,6 +3465,9 @@ dw2_find_symbol_file (struct objfile *objfile, const char *name)
       return per_cu->v.quick->symtab->filename;
     }
 
+  /* Initialize filename in case there's a problem reading the DWARF,
+     dw2_get_primary_filename_reader may not get called.  */
+  filename = NULL;
   init_cutu_and_read_dies (per_cu, NULL, 0, 0,
                           dw2_get_primary_filename_reader, &filename);