From: Daniel Jacobowitz <drow@false.org>
To: Gary Funck <gary@intrepid.com>
Cc: GDB List <gdb@sources.redhat.com>
Subject: Re: how to search for a global type?
Date: Wed, 02 Jan 2008 18:02:00 -0000 [thread overview]
Message-ID: <20080102175604.GA31562@caradoc.them.org> (raw)
In-Reply-To: <20080102174158.GH30197@intrepid.com>
On Wed, Jan 02, 2008 at 09:41:58AM -0800, Gary Funck wrote:
> I did try lookup_symbol() as well, no go.
You may need to trace how ptype finds it, then. I would expect
lookup_symbol to work. If there is no symbol in the global blocks, it
falls back to static blocks (not just the current file's).
search_symbols is going to be much less efficient.
> I think one difficulty is that the current file doesn't
> define the type. It is defined in the runtime files.
>
> I haven't tried following the logic, but could you briefly
> explain the raltionship between block vectors and symbol
> tables?
Each file has a blockvector. Block 0 is its contribution to the
global symbol table. Block 1 is its static symbol table, including
things like types. Later blocks are children of one or the other,
representing functions (and further inner blocks of functions).
The symbol table is made up of the contents of those blocks, though
indexed differently (I think, I have not checked in a while).
--
Daniel Jacobowitz
CodeSourcery
prev parent reply other threads:[~2008-01-02 18:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-31 4:28 Gary Funck
2008-01-02 3:18 ` Daniel Jacobowitz
2008-01-02 5:16 ` Gary Funck
2008-01-02 13:12 ` Daniel Jacobowitz
2008-01-02 17:46 ` Gary Funck
2008-01-02 18:02 ` Daniel Jacobowitz [this message]
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=20080102175604.GA31562@caradoc.them.org \
--to=drow@false.org \
--cc=gary@intrepid.com \
--cc=gdb@sources.redhat.com \
/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