From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id A9k/DIOmZmmR1wEAWB0awg (envelope-from ) for ; Tue, 13 Jan 2026 15:09:39 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=gnu.org header.i=@gnu.org header.a=rsa-sha256 header.s=fencepost-gnu-org header.b=qhQfBqZw; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 232FC1E08D; Tue, 13 Jan 2026 15:09:39 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 449681E08D for ; Tue, 13 Jan 2026 15:09:38 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id C42244BA540B for ; Tue, 13 Jan 2026 20:09:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C42244BA540B Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gnu.org header.i=@gnu.org header.a=rsa-sha256 header.s=fencepost-gnu-org header.b=qhQfBqZw Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 7FC9C4BA2E24 for ; Tue, 13 Jan 2026 20:08:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7FC9C4BA2E24 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7FC9C4BA2E24 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:142:3::10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1768334937; cv=none; b=fnQEhcoySHzLSnG6TSZBCYqUKjTJG1cUHgF3HIrVhf4X+0wkBSyxffB4GFtwZ6dBt5tJEDS4wIJsw2Xm6EkRf9ONQCp+vNu5e80GnQCZgJO8wNAuEsJ0jOZxTObnH4xUHb9vsjIYK6JFoJytCCUOF5PMR1BPh04DUT7E+ZUKouM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1768334937; c=relaxed/simple; bh=wTjS06l1b30IctUWox5Kc67d2F05D2dBjIQM8DFqYqM=; h=DKIM-Signature:Date:Message-Id:From:To:Subject; b=gOToz/++RV8PKIT/3j+g5r8KXsRXWVw/bpuAWj+bMAZJuwGK/qFWf8J2oSuhnuwZU5iC6cOIa04o1vQQ7QakYS+6S+pIqp2VDZPMBAlUgos+GwnC4r9Mcs6jt3LSeb8XZ98mKmjGFcm3C/oSbagxoPeeP6E6n0ykmOnv/+77CV0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7FC9C4BA2E24 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vfkhE-0008Pw-R1; Tue, 13 Jan 2026 15:08:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=VostCzys/2J2q9J7LijdT0SRPNtQB4mIyc/V9BS2ULA=; b=qhQfBqZwZmoS T9Ge+qzIOmYdpxbhiBiI08jedoy7sfsl/dypjx4sXgZ9lXF1C8GFj3JfiqyOdHFsiJ8dbrxxQP8Gf a50Td/Uq2yhDrTAvzoFcUByuvlwCUPgPFt+JbkHcQDxSz4/ckjMmKe9Fhkpqt/Z+dd6CwFhYdrxIa PhHZGxKboJP8uS018wmKFqc2Pn9tuTqIzZ/iyOF8ehc8/kHAjDY4vtSnaKevB6fb6HTIixXS2Dhvl k8tP7Ua9iVR1QjlL/LTzy+zb+yEf2gQ8jaN5Oe2BR3ziCPj1Io7dshbKX+vhiA0Oz8jxfK5rE+uXC 8XJCRj6LNYCtKNtUmqD22A==; Date: Tue, 13 Jan 2026 22:08:55 +0200 Message-Id: <86qzrt2s2w.fsf@gnu.org> From: Eli Zaretskii To: Guinevere Larsen Cc: gdb-patches@sourceware.org In-Reply-To: <20260113174341.3532973-1-guinevere@redhat.com> (message from Guinevere Larsen on Tue, 13 Jan 2026 14:43:41 -0300) Subject: Re: [PATCH v7] gdb: Print linker namespace when showing a frame References: <20260113174341.3532973-1-guinevere@redhat.com> X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org > From: Guinevere Larsen > Cc: Guinevere Larsen > 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