From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id TuTEFbJFQ2hSogMAWB0awg (envelope-from ) for ; Fri, 06 Jun 2025 15:46:58 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=g3yuSqUL; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 479611E11C; Fri, 6 Jun 2025 15:46:58 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.8 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_SBL_CSS,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (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 BB7651E0C2 for ; Fri, 6 Jun 2025 15:46:57 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 29880385B514 for ; Fri, 6 Jun 2025 19:46:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 29880385B514 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=g3yuSqUL Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id E02063856DEF for ; Fri, 6 Jun 2025 19:45:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E02063856DEF Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E02063856DEF Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1749239147; cv=none; b=owFZ0DRmee24kaaz0dKIttB8Z8z0Vio435sBXQ8bQLKC3PK9OtmWfMv+YQJV3KQs5Yx0FalenqNRbVCVibXsDAmD3+KAyCg5j7hKMx4dwN26ShWUYvWhOUbMAcAe46vtFyRH3pnVvjr/cXpg7dvM2mVP/PNDs8zGJeSkAG9qvqU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1749239147; c=relaxed/simple; bh=4IxfglYyPx6jCtOp3Kb3gsu9vvm+JWY+8SIA2LTUrG8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=W0MYh5orqezjisR7SribOiy89RTQH5mOklV/H78urUna1NgBxXbulpXC6dh4GcL4mDvr5GNati2hinSQP6/lQf4hufu5ZWGN+XwOupEWDS0Hyi2MHehGZAHrAutCKFRbBbFt1fI4cPiW8/2EUJsjBaTPrnC/YX/uWn042WAOmpU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E02063856DEF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1749239146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ad6zjNB8hICKgGpGudlCSLoOCr+FhzebKaiNO++LawM=; b=g3yuSqULeWLzfbp5NC63iEkrPLB1cNJugieAhQPUeiMbD+l2Y0eZB0ny/Q7CBOfRC2fPEj lGS9bfy0VIDo/uDleyK7mnNV0sti4ICjMivDPonfFeg8FEmLl5UZZP+pLCoUl0NOsC/MfP +2DgVQlivko80g9WNeYqO7eiLaZcpng= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-460-A3pfVeqxPH68oKylI6FtSw-1; Fri, 06 Jun 2025 15:45:43 -0400 X-MC-Unique: A3pfVeqxPH68oKylI6FtSw-1 X-Mimecast-MFC-AGG-ID: A3pfVeqxPH68oKylI6FtSw_1749239143 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B140C19560AD; Fri, 6 Jun 2025 19:45:42 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.96.134.98]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DCF2C18003FC; Fri, 6 Jun 2025 19:45:40 +0000 (UTC) From: Guinevere Larsen To: gdb-patches@sourceware.org Cc: eliz@gnu.org, Guinevere Larsen Subject: [PATCH v2] gdb/doc: Explain linker namespaces Date: Fri, 6 Jun 2025 16:45:33 -0300 Message-ID: <20250606194533.727963-1-guinevere@redhat.com> In-Reply-To: <20250606152423.567047-1-guinevere@redhat.com> References: <20250606152423.567047-1-guinevere@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: bgLjFVxGLjA7laq1PdiPYUIOCEH5dESkvULxxs6STSw_1749239143 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true 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 Recent GDB commits added more features related to linker namespaces and documented them on the manual, but did not add a convenient way for a user to understand what they are. This commit adds a quick explanation of what they are. It also fixes the inconsistency of using "linker namespaces" and "linkage namespaces", by always using the first form to avoid user confusion. --- gdb/doc/gdb.texinfo | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 7d06e1f5fa4..39a04b9b6ee 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -13106,14 +13106,15 @@ environment variable. @vindex $_active_linker_namespaces@r{, convenience variable} @item $_active_linker_namespaces -Number of active linkage namespaces in the inferior. In systems with no -support for linkage namespaces, this variable will always be set to @samp{1}. +Number of active linker namespaces in the inferior(@pxref{Files}). In systems +with no support for linker namespaces, this variable will always be set to +@samp{1}. @vindex $_linker_namespace@r{, convenience variable} @item $_linker_namespace -The namespace which contains the current location in the inferior. This -returns @value{GDBN}'s internal numbering for the namespace. In systems with no -support for linker namespaces, this variable will always be set to +The namespace which contains the current location in the inferior(@pxref{Files}). +This returns @value{GDBN}'s internal numbering for the namespace. In systems +with no support for linker namespaces, this variable will always be set to @samp{0}. @end table @@ -22242,11 +22243,18 @@ be determined then the address range for the @code{.text} section from the library will be listed. If the @code{.text} section cannot be found then no addresses will be listed. -On systems that support linkage namespaces, the output includes an +On systems that support linker namespaces, the output includes an additional column @code{NS} if the inferior has more than one active -namespace when the command is used. This column the linkage namespace +namespace when the command is used. This column the linker namespace that the shared library was loaded into. +@cindex linker namespaces +Linker namespaces are a feature of some standard libraries, that allow +shared objects to be loaded in isolated environment, eliminating the +possibility that those objects may cross-talk. Each set of isolated +shared objects is said to belong to a "namespace", and linker related +actions such as relocations do not cross namespace boundaries. + @kindex info dll @item info dll @var{regex} This is an alias of @code{info sharedlibrary}. @@ -22286,10 +22294,10 @@ conditions or commands as a catchpoint does. @item info linker-namespaces @item info linker-namespaces @code{[[@var{n}]]} -With no argument, print the number of linker namespaces which are -currently active --- that is, namespaces that have libraries loaded -into them. Then, it prints the number of libraries loaded into each -namespace, and all the libraries loaded into them, in the same way +With no argument, print the number of linker namespaces (@pxref{Files}) +which are currently active --- that is, namespaces that have libraries +loaded into them. Then, it prints the number of libraries loaded into +each namespace, and all the libraries loaded into them, in the same way as @code{info sharedlibrary}. If an argument @code{[[@var{n}]]} is provided, only prints the base-commit: 21b25b168dc6ed25a14c88fa43ae8128487cb557 -- 2.49.0