From a98c29a089b946b7ab955a0cc3b3e7cf740a940c Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Tue, 30 Apr 2013 21:11:50 +0000 Subject: * dwarf2read.c (dw2_find_symbol_file): Initialize filename before calling init_cutu_and_read_dies. --- gdb/ChangeLog | 5 +++++ gdb/dwarf2read.c | 3 +++ 2 files changed, 8 insertions(+) (limited to 'gdb') diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3e450e3..16f4357 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 8dcf971..f640a40 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); -- cgit v1.1