This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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;
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]