This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch+7.3] gdbindex regression: stabs forgotten [Fix crash of gdb save-index on a STABS file]
>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
Tom> On the reader side, the code in elfread.c is written to read STABS
Tom> first -- and skip using the index if any are found. This handles the
Tom> problem that an objfile can only have one set of quick functions.
Jan> I do not see it implemented. This is a regression.
I must have dropped something somewhere along the line, oops.
Or maybe I just botched the logic when I added lazy psymtabs.
Jan> if (dwarf2_has_info (objfile))
Jan> {
Jan> - if (dwarf2_initialize_objfile (objfile))
Jan> + /* elf_sym_fns_gdb_index cannot handle simultaneous non-DWARF debug
Jan> + information present in OBJFILE. If there is such debug info present
Jan> + never use .gdb_index. */
Jan> +
Jan> + if (!objfile_has_partial_symbols (objfile)
Jan> + && dwarf2_initialize_objfile (objfile))
This makes the case of "stabs, plus gnu index, plus -readnow" a little
worse.
It is hard to imagine anybody caring about this kind of thing though.
I just thought it was funny.
Jan> /* If we have not read psymbols, but we have a function capable of
Jan> reading them, then that is an indication that they are in fact
Jan> available. */
Jan> - if ((objfile->flags & OBJF_PSYMTABS_READ) == 0)
Jan> - return objfile->sf->sym_read_psymbols != NULL;
Jan> + if ((objfile->flags & OBJF_PSYMTABS_READ) == 0
Jan> + && objfile->sf->sym_read_psymbols != NULL)
Jan> + return 1;
I think this change requires an update to the comment and also maybe to
the corresponding comment in symfile.h.
Tom