This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] fix dwarf2read.c compilation error
- From: dje at google dot com (Doug Evans)
- To: gdb-patches at sourceware dot org, tromey at redhat dot com
- Cc: agamble at google dot com
- Date: Sun, 20 May 2012 10:19:16 -0700 (PDT)
- Subject: [commit] fix dwarf2read.c compilation error
Hi.
fyi, I've committed this to fix the build failure.
I also added a test for symtab->includes == NULL.
btw, it's not clear to me that this function implements
what its comment says it does.
Perhaps it's something about how symtab->includes is created,
but how is the "most specific" symtab found?
/* A helper for dw2_find_pc_sect_symtab which finds the most specific
symtab. */
static struct symtab *
recursively_find_pc_sect_symtab (struct symtab *symtab, CORE_ADDR pc)
{
int i;
if (BLOCKVECTOR (symtab) != NULL
&& blockvector_contains_pc (BLOCKVECTOR (symtab), pc))
return symtab;
if (symtab->includes == NULL)
return NULL;
for (i = 0; symtab->includes[i]; ++i)
{
struct symtab *s = symtab->includes[i];
s = recursively_find_pc_sect_symtab (s, pc);
if (s != NULL)
return s;
}
return NULL;
}