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] choose symbol from given block's objfile first.


>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:

Joel> But I also believe that this is a useful patch, because I think
Joel> that the answer yielded by GDB using this algorithm has more chances
Joel> of returning the symbol that the user actually meant.

I agree.  This change would make gdb's behavior less surprising in some
corner cases, and I think it is hard to argue that people know or rely
on gdb's current behavior.

Joel> This is only a prototype at the moment. It fixes the problem while
Joel> not causing any regression with the testsuite.  I am wondering about
Joel> the loop over all objfiles callling lookup_symbol_aux_quick. I think
Joel> I would need to apply the same treatment, in case
Joel> lookup_symbol_aux_symtabs doesn't return any match.  But I'm not sure
Joel> why I'd need that...

Yes, I think you'd need this change there as well.

gdb should end up in the lookup_symbol_aux_quick loop if the symbol in
question is in an unexpanded psymtab.  In this case you want to be sure
to check the block objfile first.

Joel>         ALL_OBJFILES_STARTING_WITH

Works for me.

Tom


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