From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id PBr6J4zG0WIttxMAWB0awg (envelope-from ) for ; Fri, 15 Jul 2022 15:57:00 -0400 Received: by simark.ca (Postfix, from userid 112) id 931EE1E5EA; Fri, 15 Jul 2022 15:57:00 -0400 (EDT) Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=V7M5q16j; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from 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 RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 13FAA1E21F for ; Fri, 15 Jul 2022 15:56:59 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 670D2385702F for ; Fri, 15 Jul 2022 19:56:58 +0000 (GMT) Received: from gproxy3-pub.mail.unifiedlayer.com (gproxy3-pub.mail.unifiedlayer.com [69.89.30.42]) by sourceware.org (Postfix) with ESMTPS id D99F13857BBD for ; Fri, 15 Jul 2022 19:56:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D99F13857BBD Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com Received: from cmgw15.mail.unifiedlayer.com (unknown [10.0.90.130]) by progateway5.mail.pro1.eigbox.com (Postfix) with ESMTP id 1397C100401F5 for ; Fri, 15 Jul 2022 19:56:36 +0000 (UTC) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTP id CRQRo7NWBjIMdCRQRolJeq; Fri, 15 Jul 2022 19:56:36 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=ebP4w5IH c=1 sm=1 tr=0 ts=62d1c674 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=RgO8CyIxsXoA:10:nop_rcvd_month_year a=Qbun_eYptAEA:10:endurance_base64_authed_username_1 a=CCpqsmhAAAAA:8 a=pcZt2hINwrDU4G2j1sgA:9 a=ul9cdbp4aOFLsgKbc677:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: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=timmmbTX0AjDCim6Q/O3RhHC3pCBioLY3l0rGZzIZVE=; b=V7M5q16j8tuhsbifiLPxRRz1xi 5vMacplBJt/z3lWMvRZ/PvVWsNYnT4a2nKu6vlrzYsJJg/Amay1SIda6VEdMC36ipUwnI7PbMJFT5 rkUaaPsO3SksFND04buJesXIG; Received: from 71-211-185-228.hlrn.qwest.net ([71.211.185.228]:56134 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oCRQR-000VuC-BD; Fri, 15 Jul 2022 13:56:35 -0600 From: Tom Tromey To: Nils-Christian Kempke via Gdb-patches Subject: Re: [PATCH v4 3/3] dwarf, fortran: add support for DW_TAG_entry_point References: <20220713111226.2693410-1-nils-christian.kempke@intel.com> <20220713111226.2693410-4-nils-christian.kempke@intel.com> X-Attribution: Tom Date: Fri, 15 Jul 2022 13:56:34 -0600 In-Reply-To: <20220713111226.2693410-4-nils-christian.kempke@intel.com> (Nils-Christian Kempke via Gdb-patches's message of "Wed, 13 Jul 2022 13:12:26 +0200") Message-ID: <87pmi6m9ot.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: 71.211.185.228 X-Source-L: No X-Exim-ID: 1oCRQR-000VuC-BD X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 71-211-185-228.hlrn.qwest.net (murgatroyd) [71.211.185.228]:56134 X-Source-Auth: tom+tromey.com X-Email-Count: 7 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aburgess@redhat.com, Tim Wiederhake , Bernhard Heckel , jinisusan.george@amd.com, tom@tromey.com Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" >>>>> Nils-Christian Kempke via Gdb-patches writes: > Fortran provides additional entry points for subroutines and functions. > These entry points may use only a subset (or a different set) of the > parameters of the original subroutine. The entry points may be described > via the DWARF tag DW_TAG_entry_point. > @@ -21797,12 +21852,15 @@ determine_prefix (struct die_info *die, struct dwarf2_cu *cu) > return ""; > case DW_TAG_subprogram: > /* Nested subroutines in Fortran get a prefix with the name > - of the parent's subroutine. */ > + of the parent's subroutine. Entry points are prefixed by the > + parent's namespace. */ > if (cu->lang () == language_fortran) > { > if ((die->tag == DW_TAG_subprogram) > && (dwarf2_name (parent, cu) != NULL)) > return dwarf2_name (parent, cu); > + else if (die->tag == DW_TAG_entry_point) > + return determine_prefix (parent, cu); > } It seems to me that this will also need a special case in cooked_indexer::index_dies to ensure that the cooked_index_entry for the entry point has the correct parent. Parent relationships are how name components are determined there, so IIUC the entry point's parent should be the same as the subroutine's parent -- not the subroutine itself. One way to see whether this works is to write a .gdb_index and then dump it and examine the resulting name of the entry point. thanks, Tom