From: Guinevere Larsen <guinevere@redhat.com>
To: gdb-patches@sourceware.org
Cc: Guinevere Larsen <guinevere@redhat.com>
Subject: [PATCH v3 0/3] Introduce syntax for linker-namespace specific symbols
Date: Thu, 19 Jun 2025 15:05:37 -0300 [thread overview]
Message-ID: <20250619180540.2315103-1-guinevere@redhat.com> (raw)
This series adds support for the syntax [[N]]::foo to find symbols that
belong to specific namespaces, while also making GDB's behavior more
consistent when a namespace is not specified. This needs one preparatory
patch and 2 patches actually implementing this feature
Patch 1 is an essential fix, updating how we calculate a variable's copy
relocation to take linker namespaces into account.
Patches 2 and 3 implement the new syntax, adding the necessary
supporting code and updating error messages when symbols can't be found
- where it made sense.
Do note that this series is built on top Simon's recent C++ification of
the solib_ops class, since it has better solutions to some problems than
my old versions. It should be reviewed with that series in mind.
Changes for v3:
* Removed previous patches 1 and 2, as Simon's recently merged patches
already did those in a better way.
* parser_state now also takes the current solib_ops, since that can't be
obtained from gdbarch anymore.
Changes for v2:
* solib_supports_linker_namespaces now always expects a pointer.
* Previous patches 2 and 3 were dropped.
* lookup_minimal_symbol_linkage now takes an array_view.
* created new tokens for [[ and ]], to ensure that [[N]] looks like
that.
* Fixed formatting nits from Eli.
Guinevere Larsen (3):
gdb: make lookup_minimal_symbol_linkage work with linker namespaces
gdb: Make the parser recognize the [[N]] syntax for variables
gdb: extend the [[N]]::foo syntax for files
gdb/NEWS | 6 +
gdb/c-exp.y | 82 ++++++++---
gdb/doc/gdb.texinfo | 6 +
gdb/dwarf2/ada-imported.c | 8 +-
gdb/linespec.c | 4 +-
gdb/minsyms.c | 135 ++++++++++++-------
gdb/minsyms.h | 17 ++-
gdb/parse.c | 3 +-
gdb/parser-defs.h | 37 ++++-
gdb/rust-parse.c | 3 +-
gdb/solib-svr4.c | 20 ---
gdb/solib.c | 82 ++++++++++-
gdb/solib.h | 19 +++
gdb/symtab.c | 74 +++++++++-
gdb/symtab.h | 15 ++-
gdb/testsuite/gdb.base/dlmopen-ns-ids-lib.c | 14 ++
gdb/testsuite/gdb.base/dlmopen-ns-ids-main.c | 3 +
gdb/testsuite/gdb.base/dlmopen-ns-ids.exp | 54 ++++++++
18 files changed, 473 insertions(+), 109 deletions(-)
--
2.49.0
next reply other threads:[~2025-06-19 18:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-19 18:05 Guinevere Larsen [this message]
2025-06-19 18:05 ` [PATCH v3 1/3] gdb: make lookup_minimal_symbol_linkage work with linker namespaces Guinevere Larsen
2025-06-19 18:05 ` [PATCH v3 2/3] gdb: Make the parser recognize the [[N]] syntax for variables Guinevere Larsen
2025-06-20 6:57 ` Eli Zaretskii
2025-07-07 19:18 ` Guinevere Larsen
2025-06-19 18:05 ` [PATCH v3 3/3] gdb: extend the [[N]]::foo syntax for files Guinevere Larsen
2025-07-10 2:02 ` Kevin Buettner
2025-07-10 14:47 ` Guinevere Larsen
2025-07-10 2:27 ` Kevin Buettner
2025-07-10 15:07 ` Guinevere Larsen
2025-07-10 21:56 ` Kevin Buettner
2025-07-07 19:01 ` [PING][PATCH v3 0/3] Introduce syntax for linker-namespace specific symbols Guinevere Larsen
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=20250619180540.2315103-1-guinevere@redhat.com \
--to=guinevere@redhat.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