From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id sbmJG3w/8WIA2yIAWB0awg (envelope-from ) for ; Mon, 08 Aug 2022 12:53:16 -0400 Received: by simark.ca (Postfix, from userid 112) id 632621EA06; Mon, 8 Aug 2022 12:53:16 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=Jbo98ho9; 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=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 B8DD51E9ED for ; Mon, 8 Aug 2022 12:53:15 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3E941385701A for ; Mon, 8 Aug 2022 16:53:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3E941385701A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1659977594; bh=4q5hPWCJTLnvyiFdUGhAqXr4AkNgzXtQSnxv17SSLS8=; h=To:Subject:Date:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Jbo98ho9l67EE+BDBWPyiF8LvqjjNY4Mt3gtLtRlPqcNYWNVK9no3nB9yYH5ORYvG 98q1vHSe88pJglB6YYnna4VDHrRS8GHWjgkGqqQXmvlQbDJDSZFJJcKzEyKgB4cZRA S3LD2S/mfP9ovWyduVPQBsrfU5UAzgOczoRvFd/g= Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by sourceware.org (Postfix) with ESMTPS id 7C24C385736E for ; Mon, 8 Aug 2022 16:52:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7C24C385736E X-IronPort-AV: E=McAfee;i="6400,9594,10433"; a="290648754" X-IronPort-AV: E=Sophos;i="5.93,222,1654585200"; d="scan'208";a="290648754" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Aug 2022 09:52:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,222,1654585200"; d="scan'208";a="932133526" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga005.fm.intel.com with ESMTP; 08 Aug 2022 09:52:45 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Mon, 8 Aug 2022 09:52:44 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Mon, 8 Aug 2022 09:52:44 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28 via Frontend Transport; Mon, 8 Aug 2022 09:52:44 -0700 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.46) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.28; Mon, 8 Aug 2022 09:52:43 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K4V6sNgoitgnjY6UfFhcrIoiAdha73orjYTXqn68AZNKrnQ6+EETDxTKYGuH1FC4s1boT9slnwn9FYJ2jLOHBkYrn3G5ShNzgxVhiIG0J9HPws7nRb9vvXri7nvhpCyLY6Osw4ykPAmeKAwRRKsndzM6zZu4XnbWBABvsuKpdl2flWnF9EwxoBldq3vlqDxhbu6QeJt7snVxVpkG7TIPU7Gi4G6TgUCfLeeioY5ag/fP0rZ2PW1M/csyj8yO973cXwGc42ZYOMepkjuEf1J/o1LyaceUBXhnGUkLt+xVePb/xVi6bky4FKjJBx8rmpP/Nm/KLcYZi0H800Y2ENHkyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6kqYwm9ILDHnunKKqewHG3lyFTdYV4Jc9jqGmvLDrrI=; b=FMoqsJQz85lA4L2sv+7OOL248G6L7OO2T+liL9e1rNqESuTFwzCDNotffAOHxiHqvPhCiNagVx9JBZK4s1tCb/2CmJkOgxCY8JmXkLyZ83jHFlE1BIdBz3CD+qgNmAY4Z+694IkVYEv4mDti5XCKLTZZ/IfPjfDcJDlv/gCeU+GxkTXINlc+hfgrQDbYzZc7haAwLkhijOY5jU3prIeJQ2Rd7BuvybgodnwG2W5EvUiJXDHnTx47yAhdGBr8hBTnyOSS3tHr1mhRX3nGdb5nfYwgZ8+agaF5xwGbQgCR81HJHMJblvMsqiACeGbntxjAq+FOVPLFq/emxlHzwJfs2A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from CY4PR1101MB2071.namprd11.prod.outlook.com (2603:10b6:910:1a::10) by BYAPR11MB3318.namprd11.prod.outlook.com (2603:10b6:a03:7d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.16; Mon, 8 Aug 2022 16:52:41 +0000 Received: from CY4PR1101MB2071.namprd11.prod.outlook.com ([fe80::e8e9:c389:7eda:2387]) by CY4PR1101MB2071.namprd11.prod.outlook.com ([fe80::e8e9:c389:7eda:2387%3]) with mapi id 15.20.5504.020; Mon, 8 Aug 2022 16:52:41 +0000 To: Tom Tromey , Nils-Christian Kempke via Gdb-patches Subject: RE: [PATCH v4 3/3] dwarf, fortran: add support for DW_TAG_entry_point Thread-Topic: [PATCH v4 3/3] dwarf, fortran: add support for DW_TAG_entry_point Thread-Index: AQHYlqmCdPO1iadp7k2lwGElJjnsLa1/3QT7gCVMXYA= Date: Mon, 8 Aug 2022 16:52:41 +0000 Message-ID: References: <20220713111226.2693410-1-nils-christian.kempke@intel.com> <20220713111226.2693410-4-nils-christian.kempke@intel.com> <87pmi6m9ot.fsf@tromey.com> In-Reply-To: <87pmi6m9ot.fsf@tromey.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.6.500.17 dlp-reaction: no-action x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e7e7466e-c37a-4cb5-563c-08da795e688f x-ms-traffictypediagnostic: BYAPR11MB3318:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: gK1QRBrfr4XTe/xBFClC6z1y3eWAkKVpmklb5xfB6m+GE7GLUF6EA23KbOARGRcsdBtA3V4d7SYHsRHxW00jx5YbnfeX8FwqB9Vq7gHswmu5ZvGE73SMV/zr/hUJh8EP8F5tsXUdZxpavZ2pkIomNA7PQQab88QXJQWsQChuTIMIxTODvlM3PQFD/jh5pfL/mfzwJtTP9aTg93qEF9Nvcd8avUr/1AliXXDjwyuYYDg1AexbqyqjKqe5m59Yv5mQruIL2uebU+7HRr8yAoFQXinnVTHQ8PRL2OudDriM7I+eVSEGADEQSBLEjdBqWx+rPU41AIbpZAn/KzYhOlcxaqTA2bvOe54Pt5ADlKOj25cBAI2DATnSCf7IiKlUnnk7F6/+9ovJgg2xf0IEVFIdH53vTSmZ9Ph26vHB/OdVYmFNY0QxoGYOwg+1UYeBfOyH4Jea3uhuIqwuojMUTELeoE3YJZg3jYbYd0tcBWX7EZCAc6cbOFzgVEINAMNREXkWjRdKJ3UZyGBFY6aGrX/6v/qv+dt3/TBmSyE39pxOkgqxI74Y7Er7nbHIUmGm0lzz+TTBiZ/GzCiVV12csuBGbIJ1VWOfDaBMPX+yyj/kCVGFs+IM0nqmpkfn8OyhvZbTu+UzGjjgJGUUQEmY2ie/aC1DZ//fUk6k3SHsRHJL8VtM2ypcgeiBt+7CIgPUsd0jWjWpeLAPNwgo0OrHbNKoHXHRMPKt7tAfZ3ez8VxrwfsWZr4ADCq2rPNY5kPsNYrZcgzjxLAcv6meXn+B1IapOrFJorE5IajfOKfm7aCe7h1n87WthYaDqy85TA1rC97W x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CY4PR1101MB2071.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(376002)(366004)(396003)(39860400002)(346002)(136003)(26005)(110136005)(2906002)(38070700005)(53546011)(82960400001)(55016003)(9686003)(6506007)(7696005)(71200400001)(316002)(33656002)(41300700001)(186003)(478600001)(5660300002)(86362001)(8936002)(122000001)(83380400001)(54906003)(38100700002)(4326008)(8676002)(66476007)(66446008)(52536014)(76116006)(66946007)(64756008)(66556008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunk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ascii?Q?af4G+EDQ9xEnmodmAvhMjDUAB9/SYidCWQ1NKsSlV7MujGTpg4rXOgB+Xa0z?= =?us-ascii?Q?8CLWC2+h6rshLHd5WJm7RwTyxjLGZVlo/ZQGIFL1e8hyiNoCq6F1/O4zsOka?= =?us-ascii?Q?OgxbBBtrGedRa8XJvyUTfP8bBXtkBQFFUTkO0IZo1echTy/s6bjF4Yi9DWOx?= =?us-ascii?Q?mefRzZ+gLSWSMJyPBFUkHHErunTYu8V6tqe0s3fqEdUS7sZbncWfKIeq/5y2?= =?us-ascii?Q?qY3Mtivx7pFeSi2iNpPeYc8Ispx9Pfc2jcldhi2vcxV48mM5jGkVEmrzBdBH?= =?us-ascii?Q?rv2CJ2felOe6jEDonQs0fAe2VRxTIN+TzMwPUi1RKs4aG14YEIFj03tzZDQ4?= =?us-ascii?Q?Ecm46FQYvXT0xQV385IVDB+gUrQJ8Y0bfVBdD0df1d04lBW/oRnFLhcJPYaW?= =?us-ascii?Q?4/dw39C0pyaHdBbG0rffSoaA/l7mB0sVKJpiN1UWbHDUC8MNtcGc2hrKCOMS?= =?us-ascii?Q?0svoHmCKwUlQ0knHI15wmYrvP+4j8JPeMyjoEZKAVLfB3KrpOX/LqGYTtERq?= =?us-ascii?Q?E9xwg7vtNL5WCJilYSRE/U7+TTGEvaAKF1lTnY7Gvdo/QCDYWx41wgT4e5o8?= =?us-ascii?Q?g6MR6Y0N31h/TW94L1zJ/kIQvRvI+GmKWGQNIPsRiJ5+ZSJrx5tAbYwjRk2x?= =?us-ascii?Q?eiV9zOxgPmyJhcqeJR7Rln9F3Lio6490WnKA7Xmu5fqNQgilJuc7iil3rBO9?= =?us-ascii?Q?IpHG8p9cZHGHaCZZbreXU1/L/fE/86AQYxDtAJBYKPEcJ6fokTAPiNod+mFM?= =?us-ascii?Q?Cg=3D=3D?= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CY4PR1101MB2071.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e7e7466e-c37a-4cb5-563c-08da795e688f X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Aug 2022 16:52:41.4144 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: yYk08vlFmWIYsrPDnezMLl5J+GDiUEk9RLGZDPKTMK6Ac2p3D159HM0QTZo4Uxj1uDS5JW/qIxjxmRt2m240JZK6KtV0cl8RiEFvfXEMEb8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3318 X-OriginatorOrg: intel.com Content-Transfer-Encoding: quoted-printable 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: , From: "Kempke, Nils-Christian via Gdb-patches" Reply-To: "Kempke, Nils-Christian" Cc: "jinisusan.george@amd.com" , "aburgess@redhat.com" Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" > -----Original Message----- > From: Tom Tromey > Sent: Friday, July 15, 2022 9:57 PM > To: Nils-Christian Kempke via Gdb-patches > Cc: Kempke, Nils-Christian ; > aburgess@redhat.com; Tim Wiederhake ; > Bernhard Heckel ; > jinisusan.george@amd.com; tom@tromey.com > Subject: Re: [PATCH v4 3/3] dwarf, fortran: add support for > DW_TAG_entry_point > = > >>>>> Nils-Christian Kempke via Gdb-patches patches@sourceware.org> 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 describ= ed > > 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 () =3D=3D language_fortran) > > { > > if ((die->tag =3D=3D DW_TAG_subprogram) > > && (dwarf2_name (parent, cu) !=3D NULL)) > > return dwarf2_name (parent, cu); > > + else if (die->tag =3D=3D 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 Hi Tom, Thanks for the review - ah, I see. Let me quickly recap just to see whether= I understood this: when writing the gdb_index we use the full_name (struct obstack *storage) method of the cooked_index_entry. In order for the name scope to be correct we'd have to set the function's parent as the entry's parent. I changed this now to correctly set the cooked_index_entry's parent but, I could not test this with my Fortran examples/code. The problem is that full_name (struct obstack *storage) does not consider the scope when the language is set to Fortran - while I could verify that the parent is set correctly and the name would be printed correctly if I hack the language if a bit - with Fortran code (the currently only user of DW_TAG_entry_point I know), full_name will return 'canonical' which is still the name of the entry point without scope. I will send a v5 shortly with the above mentioned change. Thanks, Nils Intel Deutschland GmbH Registered Address: Am Campeon 10, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva = Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928