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]

Re: [RFC] Fix bug report 11479


> >   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


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