aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2013-04-30 21:11:50 +0000
committerDoug Evans <dje@google.com>2013-04-30 21:11:50 +0000
commita98c29a089b946b7ab955a0cc3b3e7cf740a940c (patch)
treeabfc31b4d6e715c0592e59b0046c51c052017755 /gdb/dwarf2read.c
parent5220199df0e9cb61b3d6742cefc1b9176f8c8472 (diff)
downloadgdb-a98c29a089b946b7ab955a0cc3b3e7cf740a940c.zip
gdb-a98c29a089b946b7ab955a0cc3b3e7cf740a940c.tar.gz
gdb-a98c29a089b946b7ab955a0cc3b3e7cf740a940c.tar.bz2
* dwarf2read.c (dw2_find_symbol_file): Initialize filename before
calling init_cutu_and_read_dies.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c3
1 files changed, 3 insertions, 0 deletions
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);