From: "Christian Biesinger via gdb-patches" <gdb-patches@sourceware.org>
To: Simon Marchi <simark@simark.ca>
Cc: Christian Biesinger via gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH][PR/24474] Make gdb.lookup_static_symbol also check the STATIC_SCOPE
Date: Thu, 01 Aug 2019 19:05:00 -0000 [thread overview]
Message-ID: <CAPTJ0XFVA3X7By__QmyEKtovf0dWL5_sAhBcGSKuTiXTvkKDLg@mail.gmail.com> (raw)
In-Reply-To: <8f4bcc74-18a0-c8f6-b97d-aef05021a656@simark.ca>
On Mon, Jul 15, 2019 at 10:28 PM Simon Marchi <simark@simark.ca> wrote:
> I am not sure this is the right thing to do, or at least some things need to be
> clarified. Global symbols are visible through the entire program (there can only
> be one of that name), whereas there can be many static symbols with the same name.
> What should the user expect if there are multiple static symbols with the same name?
> I suppose we'll return the first one that matches, without any particular guarantee
> about which one.
By the way, to follow up on that comment-- the symbol cache (or, for
that matter, symtab.c:lookup_static_symbol) does not take that into
account at all, it will only ever have one cache entry for one static
symbol name. In fact it does not even differentiate by objfile, unlike
for global symbols (??). Should maybe be fixed someday...
Christian
prev parent reply other threads:[~2019-08-01 19:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-05 1:24 Christian Biesinger via gdb-patches
2019-06-18 20:15 ` Christian Biesinger via gdb-patches
2019-07-08 22:05 ` [PING] " Christian Biesinger via gdb-patches
2019-07-15 16:52 ` Christian Biesinger via gdb-patches
2019-07-16 3:28 ` Simon Marchi
2019-07-26 22:05 ` Christian Biesinger via gdb-patches
2019-07-26 22:23 ` [PATCH v2] [PR/24474] Add gdb.lookup_static_symbol to the python API Christian Biesinger via gdb-patches
2019-07-30 1:14 ` Simon Marchi
2019-07-30 1:35 ` [PATCH v3] " Christian Biesinger via gdb-patches
2019-07-30 1:50 ` Simon Marchi
2019-07-30 1:59 ` [PATCH v4] " Christian Biesinger via gdb-patches
2019-07-30 15:41 ` Christian Biesinger via gdb-patches
2019-07-30 15:57 ` Eli Zaretskii
2019-07-30 16:01 ` Christian Biesinger via gdb-patches
2019-07-26 22:43 ` [PATCH][PR/24474] Make gdb.lookup_static_symbol also check the STATIC_SCOPE Simon Marchi
2019-08-01 19:05 ` Christian Biesinger via gdb-patches [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=CAPTJ0XFVA3X7By__QmyEKtovf0dWL5_sAhBcGSKuTiXTvkKDLg@mail.gmail.com \
--to=gdb-patches@sourceware.org \
--cc=cbiesinger@google.com \
--cc=simark@simark.ca \
/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