This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Fix bug report 11479
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Pierre Muller <pierre dot muller at ics-cnrs dot unistra dot fr>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 21 Apr 2010 11:11:17 -0400
- Subject: Re: [RFC] Fix bug report 11479
- References: <000f01cad75b$b53278a0$1f9769e0$@muller@ics-cnrs.unistra.fr> <20100412155453.GW19194@adacore.com> <000001cada5c$49b8e1a0$dd2aa4e0$@muller@ics-cnrs.unistra.fr> <20100413152823.GG19194@adacore.com>
> > But this is the trouble,
> > the chain was not cycled before my patch,
> > and thus the 'const type' was never resolved and its length
> > was still left at zero.
> > I didn't really get what the loop line 4465
> > is supposed to do, but it only operates on LOC_TYPEDEF,
> > and on the file_symbol level, not at argument list of functions...
Pierre - I understand now what you were trying to say. The problem in
this situation is that there are no global variable of the type that
we need to fix.
I think that the proper solution would be to enhance function
cleanup_undefined_types_1 to also look at symbols inside function
symbols. That way, the problem should be fixed for all kinds of
types, not just structs...
The following should work: In the loop over file_symbols, check
the symbol type: If it is a function, then get the function block,
and iterate again on all symbols inside that block. If not a function,
then we match the symbol itself. We will probably need to move the
symbol matching condition to its own function to avoid duplication...
--
Joel