From 79cef858b75b1eaf117a952ea6d6825c4d237e02 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/dwarf2read.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gdb/dwarf2read.c') 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); -- cgit v1.2.1