This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Revisit PR 16253 ("Attempt to use a type name...")
- From: Keith Seitz <keiths at redhat dot com>
- To: Doug Evans <dje at google dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 25 Jun 2015 11:26:38 -0700
- Subject: Re: [RFC] Revisit PR 16253 ("Attempt to use a type name...")
- Authentication-results: sourceware.org; auth=none
- References: <047d7b2e4e86d2189d05194b7fc3 at google dot com>
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