From patchwork Wed Jan 17 16:39:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 84268 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 983FA385801D for ; Wed, 17 Jan 2024 16:41:17 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from omta040.useast.a.cloudfilter.net (omta040.useast.a.cloudfilter.net [44.202.169.39]) by sourceware.org (Postfix) with ESMTPS id D00593858439 for ; Wed, 17 Jan 2024 16:39:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D00593858439 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D00593858439 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705509581; cv=none; b=ctXBKwHJ4nUGLAld+1nCwy51S+3X0EU7pfbyKUNCerE5Qeyy8Q7vVWXhuBjCX/y+Z5LWIF1eVnhnp6k2WTsI2/B151fOvXjXJX2WIOWqYSJMjshFWBqiPUxz+DXGp8xUnolSOs7TJBtcARXwkFvkN+9cdnESWsUbe3XB6zfkix4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705509581; c=relaxed/simple; bh=ITBCVD4RrzkhBSNUkokT3xQv0lfGP4/xsGQQJnmACpQ=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=xXAttfVh+RQXjNsY4f+YcJB4d99v484Y/+2Drax196iscI6oWCdkwcV90Uvjm8kEw62dpcPXfFgq5avyENT3ULTDZHf338beyR9Ez21oPGG2L/JfHxY9cRGo5pCGexknzrCXTy/5Q2izie0bQVmZirq4F2Nug75iLn0E0Gdzcys= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-5008a.ext.cloudfilter.net ([10.0.29.246]) by cmsmtp with ESMTPS id Q6nprL7OqTHHuQ8x0rw2C2; Wed, 17 Jan 2024 16:39:38 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id Q8wzrpoUbL3AmQ8wzrP6dS; Wed, 17 Jan 2024 16:39:38 +0000 X-Authority-Analysis: v=2.4 cv=Sdrky9du c=1 sm=1 tr=0 ts=65a802ca a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=OWjo9vPv0XrRhIrVQ50Ab3nP57M=:19 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=IkcTkHD0fZMA:10 a=dEuoMetlWLkA:10 a=Qbun_eYptAEA:10 a=mDV3o1hIAAAA:8 a=_8YuhEdOrvctkKKJAOoA:9 a=QEXdDO2ut3YA:10 a=_FVE-zBwftR9WsbkzFJk:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Cc:To:In-Reply-To:References:Message-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From:Sender: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=uH7i8nzKH3C1P0BMPEFLFctEAJiI1CERcj1BCRiI/HI=; b=UfGm5i+uppEB0HxDIXJMWLRU5u gijs4p+vlblwlyx8IHuGLF8gzCMpqiPMnkSgNYQP3ETYUyspdHGu1BMA/phBPq7LhAV2CEl23VTmO fZBXw/pAPB67VdsTj+KNwyHzI; Received: from 97-122-68-157.hlrn.qwest.net ([97.122.68.157]:56636 helo=[192.168.0.21]) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1rQ8wz-002OXE-0V; Wed, 17 Jan 2024 09:39:37 -0700 From: Tom Tromey Date: Wed, 17 Jan 2024 09:39:32 -0700 Subject: [PATCH v2 04/17] Document GDB extensions to DWARF .debug_names MIME-Version: 1.0 Message-Id: <20240117-debug-names-fix-v2-4-dbd5971a9c31@tromey.com> References: <20240117-debug-names-fix-v2-0-dbd5971a9c31@tromey.com> In-Reply-To: <20240117-debug-names-fix-v2-0-dbd5971a9c31@tromey.com> To: gdb-patches@sourceware.org Cc: Eli Zaretskii X-Mailer: b4 0.12.4 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.68.157 X-Source-L: No X-Exim-ID: 1rQ8wz-002OXE-0V X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-68-157.hlrn.qwest.net ([192.168.0.21]) [97.122.68.157]:56636 X-Source-Auth: tom+tromey.com X-Email-Count: 8 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfJH5MvdGHVo3t2FZY4HezZRTPfaFhj6rU5T+SkJNuqH5hsjC8WCyxrDo64lAgDDklQchztlZPYoUUKt08qi5/L9KzASF5hvBLeVu0GLmvyyhm50b67qy yxF+YRd2OFLsYFixCVBUAo5MzKL50qp3g9zOdDb4NRKu51kLsfdzKQYfGB54G6VUhrK/IreiGVV/iALNq7H2+25j6jSBG/s9vYo= X-Spam-Status: No, score=-3022.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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+patchwork=sourceware.org@sourceware.org GDB's new .debug_names implementation uses some extensions. This patch adds some documentation on this to the manual. Reviewed-By: Eli Zaretskii --- gdb/doc/gdb.texinfo | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 55ebf752435..e98c15242bc 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -21479,6 +21479,7 @@ program. To debug a core dump of a previous run, you must also tell * Separate Debug Files:: Debugging information in separate files * MiniDebugInfo:: Debugging information in a special section * Index Files:: Index files speed up GDB +* Debug Names:: Extensions to .debug_names * Symbol Errors:: Errors reading symbol files * Data Files:: GDB data files @end menu @@ -22682,6 +22683,44 @@ Print the number of cache hits and misses since the launch of @value{GDBN}. @end table +@node Debug Names +@section Extensions to @samp{.debug_names} +@cindex index files +@cindex @samp{.debug_names} section + +The DWARF specification documents an optional index section called +@samp{.debug_names}. @value{GDBN} can both read and create this +section. However, in order to work with @value{GDBN}, some extensions +were necessary. + +@value{GDBN} uses the augmentation string @samp{GDB2}. Earlier +versions used the string @samp{GDB}, but these versions of the index +are no longer supported. + +@value{GDBN} does not use the specified hash table. Therefore, +because this hash table is optional, @value{GDBN} also does not write +it. + +@value{GDBN} also generates and uses some extra index attributes: +@table @code +@item DW_IDX_GNU_internal +This has the value @samp{0x2000}. It is a flag that, when set, +indicates that the associated entry has @code{static} linkage. + +@item DW_IDX_GNU_main +This has the value @samp{0x2002}. It is a flag that, when set, +indicates that the associated entry is the program's @code{main}. + +@item DW_IDX_GNU_language +This has the value @samp{0x2003}. It is @samp{DW_LANG_} constant, +indicating the language of the associated entry. + +@item DW_IDX_GNU_linkage_name +This has the value @samp{0x2004}. It is a flag that, when set, +indicates that the associated entry is a linkage name, and not a +source name. +@end table + @node Symbol Errors @section Errors Reading Symbol Files