From: Doug Evans Date: Tue, 30 Apr 2013 21:11:50 +0000 (+0000) Subject: * dwarf2read.c (dw2_find_symbol_file): Initialize filename before X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a98c29a089b946b7ab955a0cc3b3e7cf740a940c;p=binutils-gdb.git * dwarf2read.c (dw2_find_symbol_file): Initialize filename before calling init_cutu_and_read_dies. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3e450e39085..16f4357d666 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2013-04-30 Doug Evans + + * dwarf2read.c (dw2_find_symbol_file): Initialize filename before + calling init_cutu_and_read_dies. + 2013-03-27 Walfred Tedeschi * target-descriptions.c (maint_print_c_tdesc_cmd): diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 8dcf9719cbd..f640a40fe2a 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -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);