From: Doug Evans Date: Sun, 20 May 2012 17:15:29 +0000 (+0000) Subject: * dwarf2read.c (recursively_find_pc_sect_symtab): Initialize "s" X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a3ec0bb1c41e2827147c6533295d1f88746e534e;p=binutils-gdb.git * dwarf2read.c (recursively_find_pc_sect_symtab): Initialize "s" before use. Check for symtab->includes == NULL before scanning it. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 615b8354057..e686fb5aa91 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2012-05-20 Doug Evans + + * dwarf2read.c (recursively_find_pc_sect_symtab): Initialize "s" + before use. Check for symtab->includes == NULL before scanning it. + 2012-05-18 Maciej W. Rozycki * mips-tdep.c (mips_reg3_to_reg): Optimize storage. diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 97291736631..6ddf23657b6 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -3003,9 +3003,12 @@ recursively_find_pc_sect_symtab (struct symtab *symtab, CORE_ADDR pc) && blockvector_contains_pc (BLOCKVECTOR (symtab), pc)) return symtab; + if (symtab->includes == NULL) + return NULL; + for (i = 0; symtab->includes[i]; ++i) { - struct symtab *s; + struct symtab *s = symtab->includes[i]; s = recursively_find_pc_sect_symtab (s, pc); if (s != NULL)