From: Tom Tromey <tromey@redhat.com>
To: Cary Coutant <ccoutant@google.com>
Cc: Doug Evans <dje@google.com>, gdb-patches@sourceware.org
Subject: Re: [RFA] Add global/static and symbol kind indicator to .gdb_index
Date: Mon, 25 Jun 2012 15:06:00 -0000 [thread overview]
Message-ID: <87r4t3ctyq.fsf@fleche.redhat.com> (raw)
In-Reply-To: <CAHACq4qC2Oek_68_cNy2kJ-HkVnn6AwXWRceoG4aiU3E-oBmQg@mail.gmail.com> (Cary Coutant's message of "Fri, 22 Jun 2012 14:20:22 -0700")
>>>>> "Cary" == Cary Coutant <ccoutant@google.com> writes:
Cary> If the right thing to do is to have only one CU, how do I decide
Cary> what kinds of names get this treatment?
I don't know of a trivial rule.
You can dig around and look at struct partial_symbol and struct
general_symbol_info and deduce most of the rules. But this is really
hairy.
The index is really tied to gdb's occasionally questionable internals.
This is one of its major disadvantages.
You could probably come up with a conservative approximation to the real
rule, that would work pretty well. I'd imagine it is most important for
types; and also easier there since types don't have a location.
Cary> (For example, some arbitrary
Cary> type "struct foo" might actually be a different type, and you'd want
Cary> multiple index entries.)
You would think so, but no, because gdb will only ever expand one of
those in response to an index-based lookup. The index is really only
used in the case where some symbol cannot be found in the current
context (or where there isn't really a current context in the sense of
some fully-read CU).
Tom
next prev parent reply other threads:[~2012-06-25 15:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-19 7:49 Doug Evans
2012-06-19 14:01 ` Pedro Alves
2012-06-19 16:08 ` Eli Zaretskii
2012-06-19 19:41 ` Doug Evans
2012-06-22 19:45 ` Tom Tromey
2012-06-22 21:03 ` Tom Tromey
2012-06-22 21:20 ` Cary Coutant
2012-06-23 19:59 ` Doug Evans
2012-06-25 14:53 ` Tom Tromey
2012-06-25 15:06 ` Tom Tromey [this message]
2012-06-23 22:25 ` Doug Evans
2012-06-24 8:09 ` Doug Evans
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r4t3ctyq.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=ccoutant@google.com \
--cc=dje@google.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox