This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Remove pre_expand_symtabs_matching quick_symbol_functions API
- From: Doug Evans <dje at google dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Tom Tromey <tromey at redhat dot com>, gdb-patches <gdb-patches at sourceware dot org>, Cary Coutant <ccoutant at google dot com>, Sterling Augustine <saugustine at google dot com>
- Date: Tue, 8 Jan 2013 11:48:44 -0700
- Subject: Re: [RFA] Remove pre_expand_symtabs_matching quick_symbol_functions API
- References: <yjt2obhnfiwq.fsf@ruffy2.mtv.corp.google.com> <87txqz7gu7.fsf@fleche.redhat.com> <50EBEB4F.3060508@redhat.com>
On Tue, Jan 8, 2013 at 2:47 AM, Pedro Alves <palves@redhat.com> wrote:
> On 01/02/2013 03:19 PM, Tom Tromey wrote:
>> I think the pre-expansion approach was needed before attributes were
>> added to the index entries, but you'd have to dig up the original email
>> messages to be sure.
>
> Do we still support those index versions? If so, do we need
> to make this conditional?
It would be good for another pair of eyes to study the new dw2_lookup_symbol.
I believe it handles this case: After expanding the symtab for a
tentative match the symbol is looked up with its attributes and only
if that matches is the symbol returned.
Plus, not that this is a bullet proof test, I ran the testsuite using
gdb 7.4.1 to generate the indices - it generates version 5 indices (I
hacked the gdb-under-test to use deprecated index sections).
fwiw, note that the new dw2_lookup_symbol is intentionally similar to
psymtab's version: lookup_symbol_aux_psymtabs.
So, yeah, ultimately it's not clear to me if the
pre-expand-symtabs-matching version was ever needed. Another pair of
eyes would be welcome.