Re: [RFC] Revisit PR 16253 ("Attempt to use a type name...")

Doug Evans
2015-06-16T21:02:46Z

On Tue, Jun 16, 2015 at 12:54 PM, Doug Evans <dje@google.com> wrote:
>...
> btw,
>
> I think I have a simple way to get the perf back with the original
> patch, but it involves (I think, TBD) "breaking"
> psyms/gold-generated-gdb-index the same way gdb-generated-gdb-index
> is "broken": PR 17387.
> Namely, only record one static psym, the theory being
> if one is not in a context where static symbol my_foo is defined,
> gdb is going to (essentially) pick a random one so why record them all?
> The catch is that, e.g., "info types foo" uses psyms/gdb-index too
> so if we went this route we'd either have to accept the breakage
> that .gdb_index introduced (PR 17387) or rewrite "info types, etc.,
> to work differently: it'd have to scan the debug info, but how important
> is a fast "info types"? One could employ various kinds of caching
> to speed things up a bit.

Sorry for the followup.

Another way would be to have two different kinds of lookup.
IOW, record all the static versions of a symbol in the index,
but (1) only use one of them (the first?) for some lookups and
(2) use all of them for "info types"-like lookups.

It's still substandard, I think, as the symbol we use
for (1) may have the wrong domain, and we should really just
fix gdb-generated-gdb-index for 17387,
and record the domain in the index to fix the perf issue.

OTOH, as with your v2 patch for 16253, it's an incremental
approach.