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: [RFA] Reverse order of find_function_symbols/find_method in linespec.c


On Wed, Mar 6, 2013 at 4:45 PM, Keith Seitz <keiths@redhat.com> wrote:
> On 03/05/2013 03:06 PM, Doug Evans wrote:
>
>> So we can fix the (anonymous namespace)::function case,
>> *and* namespace::class::method (where method is in class and not a
>> baseclass)
>> simply by reversing the order of (1) and (2).
>
>
> Good catch. I think you're absolutely right. Well, that and my philosophy is
> if it doesn't break the test suite, then it's probably okay (at least w.r.t.
> linespecs). I try to be pretty thorough when writing tests for features that
> I've worked implemented.
>
> I only have one small suggestion. With the reorg introduced by your patch,
> we can unconditionally call find_function_symbols on lookup_name and then
> worry about computing class and method names and calling find_method if that
> fails. Finding a scope operator is irrelevant if we found a symbol for
> lookup_name already.
>
> So the call to find_function_symbols can be pushed even further up. I've
> included a slight revision of your patch which does this.

I had to hand apply your patch, I didn't dig into why.

I will check it in in a few days if there are no objections.


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