From patchwork Sat Dec 9 20:56:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 176241 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp6237014vqy; Sat, 9 Dec 2023 12:57:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IGsuyLqHamL/uihjUP7tsKmE8rsXkfp4bR9fDdfzbNe9VAY8C5OY9HXYAfBpZ3G3mvnpSyG X-Received: by 2002:a05:622a:8d:b0:425:4043:41cc with SMTP id o13-20020a05622a008d00b00425404341ccmr3676927qtw.120.1702155455550; Sat, 09 Dec 2023 12:57:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702155455; cv=pass; d=google.com; s=arc-20160816; b=qDMiqR/j73QSJifguJMObsU7BLiaSBCSOIDBw95UUfhfuXVuKJlQJGNHM8eZ50sGDe TCSLsvLX/XECDdXnB1xjsLTSJEMjx6zdIZ5tSFyZsq1+CBUntQjpbD0cPGL8yzgOsXmj 3L/OSVnfWzplf17d09tObjAxuqPNwelKd3Vh8Y9xAimWnhQ1k/a+Neoo4j7QlR5fg4u3 57sfc8XTwZ8+xNPj8jvA39MHbPCrzlWfdV3qEtqpAo7tszjz55gqBfctsU3XkW2L6Iq5 k4EXFi5U4cLXYYE8+YailVSp4A1kQzJPe9uFANBqcbO5j+k0mXQodHvVf3Ok4MqgjH5r 9MyA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=xYXhqRFj9t0DmHapuNET4LemMyO2IsWTOlEG3AnVoh4=; fh=EX71LYE/xu9mfzS34hWtmDXPy6MB2TB32R6pmtQSzqw=; b=QdIDCFAxldWygY77GX/dgMzuTDauEe+6QUth++g92mlKtgnHx3fGAe7/m7urHJuF7S ISJ7RDE0u8hq8hzUnLeaHx07mFaVE4Ui1vGhJFboe/qJ1sSUydqUQ5mE0klUyCe2n7oU 5GYJ0nj0tQPePqrMgpsyxfUZGH1DyXITb4KWB887YasfpUMgjieaaVbRC7Od+3+tIOPv h++eb7Xd87ai7m4A0qzzwO1TLolLI8KKnuaGAnhcLqO5rnHSsy2WU0lgG2CxXrLEPKry ycqTIWcLAgre+GyvepxdmJ7goZCCeLmc/W4qqJq3W6hf5Rqk98Qiv6OxWy6Kim1PJHXI YNMw== ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@tromey.com header.s=default header.b="pDlcadv/"; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id j12-20020ac84c8c000000b00423710d4b86si4401555qtv.312.2023.12.09.12.57.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Dec 2023 12:57:35 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=fail header.i=@tromey.com header.s=default header.b="pDlcadv/"; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 53905385828C for ; Sat, 9 Dec 2023 20:57:35 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from omta040.useast.a.cloudfilter.net (omta040.useast.a.cloudfilter.net [44.202.169.39]) by sourceware.org (Postfix) with ESMTPS id C911F3858C42 for ; Sat, 9 Dec 2023 20:57:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C911F3858C42 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 C911F3858C42 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=1702155431; cv=none; b=hft+x0UNOviH9uhmAY+LoSKgJlt3md5TOvS1e0wbalm+4WUH/MGPhod2KBBTYklm6ubcJKuH3Ytz3rYhvYUz5k521FQtIxJucD1WabfGae8GwKjWRv5gUUjMiANhdlvHlRzaxGUDSmqgpqh2XhiQAoaKlmiATzIIirscBiyuGkQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702155431; c=relaxed/simple; bh=K5RwEQmL3EbZwTHA+jNMogsuv2jpagnCin6nC+YcD2I=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=ZUkOlB3QtpHLSrYM31UQZmk83Tq2UHKioM1wuyjTbj1K9xPRl2c3J7oXhHf8NbjSy/u39mA6EwqdzLEeZ1FjbjvMj5ioy7IoMufS/oCGs7vT5mSYli1cWpF/nIYl13zDL7WFT4CkBK1vDtuVa+Sg6O0EJk8OdVBH0cfvrT5TS1A= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-6002a.ext.cloudfilter.net ([10.0.30.222]) by cmsmtp with ESMTPS id BzkKrTO0Q6nOZC4NornJoV; Sat, 09 Dec 2023 20:57:08 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id C4NnrCN8xM0U2C4Nnr5fro; Sat, 09 Dec 2023 20:57:07 +0000 X-Authority-Analysis: v=2.4 cv=BuKOfKb5 c=1 sm=1 tr=0 ts=6574d4a3 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=OWjo9vPv0XrRhIrVQ50Ab3nP57M=:19 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=e2cXIFwxEfEA:10 a=Qbun_eYptAEA:10 a=EzHsKoSp8snN18nz48UA:9 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject: Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=xYXhqRFj9t0DmHapuNET4LemMyO2IsWTOlEG3AnVoh4=; b=pDlcadv/f5pv6MLN/f36qIiOAz al8wEaXeUAgfijqmEBk1huhnUYIJ+iPfjy8LVWu7crWXrGpmLbC9k65tc9N2pznuRQakO5VmwKhD4 cFXX45ZkTIX9Y881qhUtBqDkV; Received: from 71-211-161-25.hlrn.qwest.net ([71.211.161.25]:59332 helo=localhost.localdomain) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1rC4Nn-002bLe-0S; Sat, 09 Dec 2023 13:57:07 -0700 From: Tom Tromey To: gcc-patches@gcc.gnu.org Cc: gdb-patches@sourceware.org, Tom Tromey Subject: [PATCH] Add some new DW_IDX_* constants Date: Sat, 9 Dec 2023 13:56:53 -0700 Message-ID: <20231209205653.3930232-1-tom@tromey.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 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 - gcc.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 71.211.161.25 X-Source-L: No X-Exim-ID: 1rC4Nn-002bLe-0S X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 71-211-161-25.hlrn.qwest.net (localhost.localdomain) [71.211.161.25]:59332 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfBZelDDgCQF927JSo20Zo/MHUAAcn+pzXHbCWpKCNiEhjbhZvF7osqkMinBMsb3mtEot4UxqMr9pGH1JYYX0TpTYxA1vRhnmk5KL1kdraOnxo9yUxOnP ZZ1mShS+Ob+w05pvizIVPPqfziVlrVbVcC18CFrScEe665kLUwXweoEuNntVocAy2ed1vINKGsPNpV6SJMCOQuSl6XgRpS/P9NA= X-Spam-Status: No, score=-3023.0 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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784839358926626534 X-GMAIL-MSGID: 1784839358926626534 I've reimplemented the .debug_names code in GDB -- it was quite far from being correct, and the new implementation is much closer to what is specified by DWARF. However, the new writer in GDB needs to emit some symbol properties, so that the reader can be fully functional. This patch adds a few new DW_IDX_* constants, and tries to document the existing extensions as well. (My patch series add more documentation of these to the GDB manual as well.) --- include/dwarf2.def | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/dwarf2.def b/include/dwarf2.def index 7ab3ee611fd4..75b75d901884 100644 --- a/include/dwarf2.def +++ b/include/dwarf2.def @@ -802,8 +802,17 @@ DW_IDX (DW_IDX_parent, 4) DW_IDX (DW_IDX_type_hash, 5) DW_IDX_DUP (DW_IDX_lo_user, 0x2000) DW_IDX (DW_IDX_hi_user, 0x3fff) +/* Internal linkage. A flag. */ DW_IDX (DW_IDX_GNU_internal, 0x2000) +/* External linkage. A flag. Note that gdb no longer generates this; + the default is to assume external linkage. */ DW_IDX (DW_IDX_GNU_external, 0x2001) +/* This entry is the program's entry point. A flag. */ +DW_IDX (DW_IDX_GNU_main, 0x2002) +/* Language for this entry. A DW_LANG_* value. */ +DW_IDX (DW_IDX_GNU_language, 0x2003) +/* This entry is a linkage name. A flag. */ +DW_IDX (DW_IDX_GNU_linkage_name, 0x2004) DW_END_IDX /* DWARF5 Unit type header encodings */