Re: [RFC] Revisit PR 16253 ("Attempt to use a type name...")

Keith Seitz
2015-06-25T18:26:42Z

On 06/24/2015 04:02 PM, Doug Evans wrote:
> A variation of PR 18150?
> You need to put the symbols in an unexpanded symtab,
> the catch being that gdb expands the symtab with main() at startup.
>

Doh! That does indeed do it!

> > Nonetheless it is not quite so straight-forward in the BLOCK_FUNCTION
> > case where we have to decide what is a "better" match:
> >
> > SYMBOL_DOMAIN == domain && SYMBOL_IS_ARGUMENT
> >
> > or
> > SYMBOL_DOMAIN != domain (but symbol_matches_domain returns 1) &&
> > !SYMBOL_IS_ARGUMENT
>
> I'm not sure either. I'm not sure the BLOCK_FUNCTION case
> can even exercise this bug.

Forest/trees. Darn my vision! :-)

>
> > In that case, I cannot say which is more correct. Moreover I have been
> > unable to figure out how to test this. I worry that I would simply be
> > introducing a regression. IMO this is getting into "risky" territory.
> > [But then my philosophy is "if it ain't broke, don't fix it." As far as
> > I can tell, block_lookup_symbol is not "broke."]
> >
> > So what do maintainers want me to do?
>
> How about this?

That looks good to me, and is fully covered by the test suite.

/me very happy
Keith