From: Eli Zaretskii <eliz@gnu.org>
To: Guinevere Larsen <guinevere@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v7] gdb: Print linker namespace when showing a frame
Date: Tue, 13 Jan 2026 22:08:55 +0200 [thread overview]
Message-ID: <86qzrt2s2w.fsf@gnu.org> (raw)
In-Reply-To: <20260113174341.3532973-1-guinevere@redhat.com> (message from Guinevere Larsen on Tue, 13 Jan 2026 14:43:41 -0300)
> From: Guinevere Larsen <guinevere@redhat.com>
> Cc: Guinevere Larsen <guinevere@redhat.com>
> Date: Tue, 13 Jan 2026 14:43:41 -0300
>
> When a user is stopped in a private linker namespace, the only way for
> them to realize that is using the _linker_namespace convenience
> variable. While serviceable, this is a sub-optimal solution, as most
> users are unaware of convenience variables.
>
> This commit introduces a new way for users to be informed of the linker
> namespace of a function, by printing it along with the function name.
> This is done by using the proposed syntax for symbols and locations,
> like so:
>
> #0 [[0]]::main ()
>
> This is done by introducing a new method to general_symbol_info, which
> uses part of the functionality behind the _linker_namespace variable
> , namely, find the linker namespace that contains the given address on
> the given program space. The reason print_name was not changed to do
> this is that the old method returns a "const char *", but the new one
> needs to return a string, and the refactor was very complicated, so the
> new method is introduced.
>
> The namespace ID is only printed if multiple namespaces are active,
> otherwise no change in behavior is expected. This commit also updates
> the test gdb.base/dlmopen-ns-ids.exp to test this functionality.
> ---
> gdb/NEWS | 4 +++
> gdb/doc/gdb.texinfo | 9 ++++++
> gdb/solib.c | 29 ++++++++++-------
> gdb/solib.h | 8 +++++
> gdb/stack.c | 9 ++++--
> gdb/symtab.c | 15 +++++++++
> gdb/symtab.h | 13 ++++++--
> .../gdb.base/dlmopen-ns-ids-framefilter.py | 31 +++++++++++++++++++
> gdb/testsuite/gdb.base/dlmopen-ns-ids.exp | 25 +++++++++++++--
> gdb/testsuite/gdb.mi/mi-dlmopen.exp | 2 +-
> 10 files changed, 125 insertions(+), 20 deletions(-)
> create mode 100644 gdb/testsuite/gdb.base/dlmopen-ns-ids-framefilter.py
OK for the documentation parts, thanks.
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
next prev parent reply other threads:[~2026-01-13 20:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-13 17:43 Guinevere Larsen
2026-01-13 20:08 ` Eli Zaretskii [this message]
2026-03-05 12:18 ` [PING][PATCH " Guinevere Larsen
2026-04-20 16:28 ` [PATCH " Andrew Burgess
2026-05-06 20:07 ` 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=86qzrt2s2w.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=guinevere@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