From: "Christian Biesinger via gdb-patches" <gdb-patches@sourceware.org>
To: Simon Marchi <simark@simark.ca>
Cc: Andrew Burgess <andrew.burgess@embecosm.com>,
gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] gdb/python: Introduce gdb.lookup_all_static_symbols
Date: Sat, 09 Nov 2019 06:23:00 -0000 [thread overview]
Message-ID: <CAPTJ0XH_f25741T835+tT1HDns+Kyas7eD-Xk74g9owo3PYkKw@mail.gmail.com> (raw)
In-Reply-To: <20093265-f125-8668-d7ba-0c36b07a53ec@simark.ca>
On Mon, Nov 4, 2019 at 12:28 PM Simon Marchi <simark@simark.ca> wrote:
>
> On 2019-11-04 12:12 p.m., Andrew Burgess wrote:
> > How about I merged patches #1 and #2, but drop #3 for now? This would
> > give:
> >
> > lookup_static_symbol - returns the global static symbol for the
> > current compilation unit, or whatever else GDB can find if
> > there's nothing in the current CU. This is basically inline
> > with what we get from 'print symbol_name' at the CLI (if we
> > limit symbol_name to just global static things).
> >
> > AND,
> >
> > lookup_static_symbols - returns the list of all global static
> > symbols.
> >
> > We no longer have a block parameter passed to 'lookup_static_symbol',
> > so hopefully and confusion can be avoided. If/when we later add a
> > Python wrapper for CU we can _extend_ the API for lookup_static_symbol
> > to also take a CU and so provide the "look over there" type behaviour
> > in a clearer way.
> >
> > Would everyone be happy with this?
>
> I certainly would, I think that brings us back to the same place we were before
> it was suggested to add the block parameter, doesn't it?
Sorry for the late reply & for confusing things -- yes, after reading
through all the discussions I think that's the best way forward.
My personal use case was & is still addressed, I just wanted a way to
find variables like these:
https://cs.chromium.org/chromium/src/content/renderer/render_frame_impl.cc?q=g_frame_map&sq=package:chromium&g=0&l=332
(^ in an anonymous namespace)
ideally also:
https://cs.chromium.org/chromium/src/ui/accessibility/ax_tree_manager_map.cc?type=cs&sq=package:chromium&g=0&l=17
(static variable in a function)
But I do have a fallback to gdb.lookup_symbol, so that one works too,
though less efficiently. Even with a CU API, this might be difficult
(maybe? depending how easy it is to find a specific function from a
CU)
Christian
next prev parent reply other threads:[~2019-11-09 6:23 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-23 16:46 [PATCH] gdb/python: smarter symbol lookup for gdb.lookup_static_symbol Andrew Burgess
2019-09-23 17:18 ` Eli Zaretskii
2019-10-08 11:07 ` [PATCHv2] " Andrew Burgess
2019-10-08 12:01 ` Eli Zaretskii
2019-10-08 16:01 ` Christian Biesinger via gdb-patches
2019-10-15 14:15 ` Andrew Burgess
2019-10-15 16:46 ` [PATCH] gdb/python: Introduce gdb.lookup_all_static_symbols Andrew Burgess
2019-10-15 17:07 ` Eli Zaretskii
2019-10-23 19:15 ` Andrew Burgess
2019-10-24 2:31 ` Eli Zaretskii
2019-10-15 19:28 ` Simon Marchi
2019-10-15 23:32 ` Andrew Burgess
2019-10-21 22:37 ` Christian Biesinger via gdb-patches
2019-10-23 19:14 ` Andrew Burgess
2019-10-24 3:11 ` Simon Marchi
2019-10-24 16:53 ` Andrew Burgess
2019-10-28 5:08 ` Christian Biesinger via gdb-patches
2019-11-01 11:53 ` Andrew Burgess
2019-11-01 13:55 ` Simon Marchi
2019-11-04 17:12 ` Andrew Burgess
2019-11-04 18:28 ` Simon Marchi
2019-11-09 6:23 ` Christian Biesinger via gdb-patches [this message]
2019-11-10 22:27 ` Andrew Burgess
2019-11-10 22:37 ` Christian Biesinger via gdb-patches
2019-11-11 16:27 ` Andrew Burgess
2019-11-11 16:31 ` Christian Biesinger via gdb-patches
2019-10-16 21:53 ` [PATCHv2] gdb/python: smarter symbol lookup for gdb.lookup_static_symbol Christian Biesinger via gdb-patches
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=CAPTJ0XH_f25741T835+tT1HDns+Kyas7eD-Xk74g9owo3PYkKw@mail.gmail.com \
--to=gdb-patches@sourceware.org \
--cc=andrew.burgess@embecosm.com \
--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