Re: [commit] Fix crash of gdb save-index on a STABS file

Tom Tromey
2011-04-14T20:44:38Z

>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> There are some concerns what is a file uses both DWARF and STABS,
Jan> it may possibly currently have a regression with .gdb_index. But
Jan> that is unrelated to this patch.

I think it should all work. At least, I designed it to.

The index itself is written by looking at the CUs in the objfile's
dwarf2_per_objfile. So, I think the index should not reference any
psymtabs coming from STABS.

On the reader side, the code in elfread.c is written to read STABS
first -- and skip using the index if any are found. This handles the
problem that an objfile can only have one set of quick functions.
This is expensive, but people mixing in this way deserve it ;-)

Tom