This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Typedef'd method parameters [0/4]
- From: Tom Tromey <tromey at redhat dot com>
- To: Keith Seitz <keiths at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 25 Apr 2011 14:53:25 -0600
- Subject: Re: [RFA] Typedef'd method parameters [0/4]
- References: <4DB09E6C.8000202@redhat.com>
>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:
Keith> I've attempted to split this up into four different patches to help
Keith> facilitate review, but to be honest, I'm not sure how helpful this
Keith> split is going to be, but I'll leave it to maintainers to ask for
Keith> whatever would help them digest this easiest.
I think this split was pretty good.
I didn't try to read the combined patch, so I can't actually say whether
it helped :-)
Keith> The inability to use typedef'd parameter types arises from the
Keith> fact that we do fairly literal lookups in the symbol table from
Keith> decode_line_1 et al.
I have often thought that maybe this is something we would want to fix.
Instead of storing `namesp::klass::method(int)' in the symbol table,
maybe we could just have an entry for "namesp", which would itself
contain a symbol table for the namespace, and so on, down to an entry
for "method" that would contain all the method overloads.
This would be a big change, though. And I do have to wonder what
concrete benefits would arise from it, aside from "work the way
everybody expects". Maybe it would let us make the DWARF reader lazier.
Keith> A note on the test suite: I propose to get these all approved and
Keith> commit in one go. If done this way, no test suite regressions should
Keith> occur. Or at least they don't show up here. :-)
I would not mind if the cp-name-parser.y patch were committed
separately. I see it as a separate cleanup. But, it is not very
important, and if you have a single patch ready, then don't bother.
Keith> Just a side note for maintainers, since I know this is going to
Keith> come up: I have tried my best to consolidate name
Keith> canonicalization, but there are a bunch of problems that arise
Keith> from attempting to do this. I believe the solution proposed here
Keith> is the most consistent from an API perspective -- everything
Keith> still acts the way it should (and has). The alternative is to
Keith> canonicalize_no_typedefs before anyone calls lookup_symbol or
Keith> lookup_symbol_in_language. I rejected this approach.
I think the approach you took is fine, but I am curious to know why you
rejected the other.
Tom