This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfa] eliminate some annoying mdebug-related symtab crashes
On Fri, Jul 20, 2001 at 10:24:25PM -0400, Elena Zannoni wrote:
> Oh dear, I feel ill. Where is the paper bag, quick! So, the || check
> before calling init_psymbol_list works if the two lists are kind of in
> synch. They are grown/allocated together. They are both zero at
> start, and they get initialized both to the same size in
> init_psymbol_lists.
Exactly.
> Mon Apr 8 23:57:43 1991 John Gilmore (gnu at cygint.cygnus.com)
>
> * dbxread.c (dbx_symfile_read): Initialize psymbol list if this
> is the first symbol read, even if not mainline.
>
> I would think that extend_psymbol_list was introduced afterwards, and
> this broke the logic of Gilmore's change.
>
> So what to do? I am kind of convinced that your patch is
> correct. But..., is there any chance you can run the gdb testsuite
> before and after your changes on a couple of platforms that have at
> least dwarf2 and stabs debug info (I mean separately, not in the same
> objfile)?
I'll try to do this and get back to you about it next week.
> Another alternative would be to insert a call to
> init_psymbol_lists(objfile, NUM_OF_SYMBOLS) somewhere in mdebugread.c.
I didn't do that because I couldn't find a reasonable NUM_OF_SYMBOLS,
but I could just use a hardcoded guess like some of the other symbol
readers do, I suppose. I'd rather fix it as I proposed; I'll run those
testsuites and see what I can turn up.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer