From: Michael Snyder <msnyder@specifix.com>
To: Doug Evans <dje@google.com>
Cc: gdb <gdb@sourceware.org>
Subject: Re: info addr foo [where foo is a static global in multiple files]
Date: Wed, 02 Apr 2008 20:02:00 -0000 [thread overview]
Message-ID: <1207166530.31772.135.camel@localhost.localdomain> (raw)
In-Reply-To: <e394668d0804021252q727e9721ra17771cdb28d70bd@mail.gmail.com>
On Wed, 2008-04-02 at 12:52 -0700, Doug Evans wrote:
> If I want to find the addresses of all variables named foo, it seems
> like there should be an easy way to do this. "info addr foo" will
> only print one. There's also the issue that if I only want one it may
> not print the one I want. Should it print all of them?
>
> The user could study the output of "info var foo" and do things like
> "p/x &'file.c'::foo" for each variable, but that seems a bit clumsy
> (and doesn't work if the files all happen to have the same name).
>
> [As a workaround, the user could do "maint print symbols", but I
> wonder if "info addr" should change.]
Hmmm... good question.
By the same token, the mirror image of "info addr" is
"info symbol". It takes an address, and finds a symbol
that matches. In some corner cases, there might be more
than one symbol at the same address, but I assume info
symbol will only show the first one found. Maybe that
should be addressed too (no pun intended).
prev parent reply other threads:[~2008-04-02 20:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-02 19:53 Doug Evans
2008-04-02 20:02 ` Michael Snyder [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=1207166530.31772.135.camel@localhost.localdomain \
--to=msnyder@specifix.com \
--cc=dje@google.com \
--cc=gdb@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