aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2012-05-20 17:15:29 +0000
committerDoug Evans <dje@google.com>2012-05-20 17:15:29 +0000
commita3ec0bb1c41e2827147c6533295d1f88746e534e (patch)
treedc06eec8d02c877170c98fdda4dce625c243e853 /gdb/dwarf2read.c
parent3550b23619ef1078f00b3583ae04656410f5667f (diff)
downloadgdb-a3ec0bb1c41e2827147c6533295d1f88746e534e.zip
gdb-a3ec0bb1c41e2827147c6533295d1f88746e534e.tar.gz
gdb-a3ec0bb1c41e2827147c6533295d1f88746e534e.tar.bz2
* dwarf2read.c (recursively_find_pc_sect_symtab): Initialize "s"
before use. Check for symtab->includes == NULL before scanning it.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 9729173..6ddf236 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)