From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by sourceware.org (Postfix) with ESMTPS id 4215F3858D1E for ; Mon, 11 Apr 2022 16:08:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4215F3858D1E X-IronPort-AV: E=McAfee;i="6400,9594,10314"; a="261897801" X-IronPort-AV: E=Sophos;i="5.90,252,1643702400"; d="scan'208";a="261897801" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Apr 2022 09:08:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,252,1643702400"; d="scan'208";a="589937318" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by orsmga001.jf.intel.com with ESMTP; 11 Apr 2022 09:08:35 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Mon, 11 Apr 2022 09:08:34 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Mon, 11 Apr 2022 09:08:34 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.177) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Mon, 11 Apr 2022 09:08:34 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Eqf4tgdEHAZf+2UMKif5b9pWxl2qEKaQ0q5/ae7iHmQdVJJGazV7QI7W90lGt17BqXOznNhtcRJjRn5vHMU20sFAWRB29LiywU4rfMiR5HqPZNt9Ux5wLdcsyqAmdyJAX+yhxSdFJ2tJA1nxFoiUJQbC80HQbFveA1nbs7svevgbwzkfJV1gMch1Xo2tKraHTyGIIyw29+3ipSdlbd1wsUybMSDD5dDkv91mAG3I5SmAzGF+eowlGM12rV7jmRikLVyh0AeNcDltN5B3tZ8d7Ho+ivCTBFjcCXwdW67FAmGXWtMtU2Xo3hNrNfIA9lpW0tWy2HX7dpPpZRx3ByZaJA== 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=9yqD85rvdpM8cXA1O8oxMEc9HIlXhJxc/b2nl8iDMK8=; b=lOWlAz+wn0wYHiGxE8VxZba+oEb0V52sAyYSUBDAjPgHq/6NzeUlQYHCD38Av8i9voKAoeyZzm2I13rTnWdmS0Q9CoJLMZNgN1K0gENW8qtGlbBIyBDqIAyr4oh9d9SGFqX3lS2KehkpJ5cZsdx4wjrV+3wQlWxpWCebKhNLn2KWH0bhBw7piLeuzRORsO0Jxcf8GpfSXAXO1NQ8uXoW1jrzzlgzAqc1jNsdLqAZ+YL4iKWnIa9hlCipC9/ZSWCT/X3jsuSQgImDv85PVUpcGrdfeXIZ4rXAKKvW/+jEYlTYeqZmhLKRH4NMdK+U2p2WR5CHlvqC/9PsnIyEquqslA== 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 SN6PR11MB3039.namprd11.prod.outlook.com (2603:10b6:805:d3::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.29; Mon, 11 Apr 2022 16:08:32 +0000 Received: from CY4PR1101MB2071.namprd11.prod.outlook.com ([fe80::99b6:62d4:b384:998]) by CY4PR1101MB2071.namprd11.prod.outlook.com ([fe80::99b6:62d4:b384:998%5]) with mapi id 15.20.5144.029; Mon, 11 Apr 2022 16:08:32 +0000 From: "Kempke, Nils-Christian" To: Kevin Buettner , Nils-Christian Kempke via Gdb-patches Subject: RE: [RFC][PATCH 0/1] Fortran entry and DW_TAG_entry_point Thread-Topic: [RFC][PATCH 0/1] Fortran entry and DW_TAG_entry_point Thread-Index: AQHYPqRFEBiXZzIF70i9O1WlJKmni6zmk3yAgARrDnA= Date: Mon, 11 Apr 2022 16:08:32 +0000 Message-ID: References: <20220323105319.2894169-1-nils-christian.kempke@intel.com> <20220408133655.3a556fc4@f35-zws-1> In-Reply-To: <20220408133655.3a556fc4@f35-zws-1> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.6.401.20 dlp-reaction: no-action x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a1cf3ac9-a5ce-4a22-9d32-08da1bd58677 x-ms-traffictypediagnostic: SN6PR11MB3039:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: jEbtQsYVdTORnIVeP2zvfp0lGbVm9WDdY8ItwT3LThxJigsUNRt/vsXTrpcY+/Q2Bxqrcb3E6bc9NNYL735nyXhsjZRXTId4Po6Ub63jOalUzMqo1tglE97ZY2JzD1P8UjYqw6v+y7u3tpEtwUE9SLOcuDWIFfGqAIf1H8awNVyFb/8XZsJ3Bxl+9vyrqiE8Q8R38MOlvDhsYORLmJXBCY1IruDhjQg7a+n3Za/0Lu2LrBFFfGPHariG3wkmcv/k1z3YvB3ICHx/2TuNAUXqXQ3thASWNhpIqN2IAZ/t9kj7M+f8tMjipSfknVoQurCwQJbrAMJD2PWTzOFObfYzVjxHx1VAHuEjzWo75qB1i5LAtingNDSrNxUzT4FklOa1dEdHcTbwRx57fzK222QOCNFE+DkQsmvemCIfZhp0S7Fu2kdqczjxya+oHwQKFmlveimYAp+dotVYIx1/UIirVWcNKump1BTLt/SbqEED5ooxHuHd2Au5UyGWF4cgQizXeJ1/0ILpyi1Jb0Dgu9S0GKX5bE+syXCrlmMM/8GFxVhRC9jJ8b/DsroxvuQmj0hziG0YjCWA/EsBZZkhc7avok/rjV/dd7XHOU/DUUGON7cxvTun1SR2bNqS7aM56fA8yQ/avQxEXLaav3GuQ+1soPkXpIr/uuJkZ0cATagYT/geBtFPOWeXfvUF0SASKQsUXA1oR0ngjWv4WIEMCM14xNTzrrwvhIQloT4kh0XoXwlPeibis3f7tjjPHkNDfU0/okvGPvAHfSJ5ft+VEPNlQ5ElyCa+TAnOVoajfOBIFYg= 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:(13230001)(366004)(8676002)(66476007)(64756008)(66556008)(66446008)(82960400001)(71200400001)(38100700002)(76116006)(122000001)(9686003)(316002)(53546011)(33656002)(83380400001)(6506007)(86362001)(110136005)(66946007)(7696005)(2906002)(5660300002)(8936002)(52536014)(38070700005)(55016003)(186003)(15974865002)(508600001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 2 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?2j8lXrD6LKFWzxps7WaNFxp3DmCNYAFFm+RTebgu/eOeaPY9+zCxIonKXIvT?= =?us-ascii?Q?P7TChWhBptKlXAxqs2oF64urfmFMf1FQ+eC8pUi0yu1V3Pfjy4pPn2wkOkfH?= =?us-ascii?Q?FR4Pi90DXGJUt5oG6aauVm+3lxytBcIY6VO3h7unBLY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pLDqNLARwojfI92dw0FeAuu6nqBEquY/NEICfnEObNT0g+S?= =?us-ascii?Q?JJfXPUJRJ8WmNl7BfIDC86j6YNarVg8+yZCFj4EDeftMTUlOo5nwLrFiKj7R?= =?us-ascii?Q?k+6g3hRKNfBZNtqNOEgRkpBdqQkadHiIRDMaB9CdTh5EeeDX5+knYh4ULJu6?= =?us-ascii?Q?HlitZkow3/818noFs5tuISuRItYqtUXrBVQOOCfOkLwjGqIPB85S8KkhHEnJ?= =?us-ascii?Q?SsZkmTvgyRIOT1f3Dnp2yDHz3lLBI4SUq6JYJ0MnYZgbrEIF7bjcwmSi3Iik?= =?us-ascii?Q?xj84OJsfVhyDE62bgI/D9LEcNYLEJxHlHHYC/Fxfgjh5ur5yYli+aycSoZYZ?= =?us-ascii?Q?dJD1i2FrGCF3uj3m7pblg/TU/HizoOy5CqH6SSCGh7mFBCKyR62Gryh9y4mo?= =?us-ascii?Q?S9WwncQ4ReThEZqb30JLLMwSVfn8JY8iEryQx6egf3D9nM1JL/a+kcaNXgEz?= =?us-ascii?Q?W90cs2t4GjQZkCTHCW483otiqPkTmw2dvhO1nnalokjPNdKSZP7orqN6lI90?= =?us-ascii?Q?uvJ8QvdATbPJxQTanlV8zAneJ/N9Iio3QPjNCvI9ZPOfIiySdv4KvxOep021?= =?us-ascii?Q?QNfGHEh+opSo9qHXyeRtdBolzYN9HQFYRQk6pLAhtf5exPGJFFIVsFvxHjkP?= =?us-ascii?Q?d+lKi6A563GXctpUjTZh+gPmRUE9vL3TT3asODMdMkJCb4QjDDw3Yvdord8M?= =?us-ascii?Q?CB6+0jGbdv7kxlaTGiEMKb+Lg/dciqQ65ZxayWgeuaz8qcmjdlVOourH1Ov0?= x-ms-exchange-antispam-messagedata-1: UYIpXbrAXF0NlYnZMkynElbeKtLP7y+++Nk= 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: a1cf3ac9-a5ce-4a22-9d32-08da1bd58677 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Apr 2022 16:08:32.3222 (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: oHsAoKxbUhI5IU9PWhYPvwdaAS1LPdP4I4as8qLYmRpX2Jx4UtAXurSDlW1Ti66+9/lxYycdHkbkTOJfrJ545Zm+BtXhDKZZYHGiL0FN6Ds= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3039 X-OriginatorOrg: intel.com Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org 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: , X-List-Received-Date: Mon, 11 Apr 2022 16:08:38 -0000 Hi Kevin, - thanks for having a look! > I skimmed the dwarf2/read.c part of the patch; I think it looks > reasonable, though I'd prefer that the comment introducing > add_partial_entry_point() not refer to Fortran entry points. > (DW_TAG_entry point could be used for other languages too, right?) > Yes, absolutely. I'll change that - it is in theory language agnostic (even though it might have been introduced with Fortran in mind). About the tests: yes, good point. Somehow I did not think of that at all .. = I will add a proper DWARF test and resend the patch. I would keep the existing test too - it seems to have some value still in testing whether the entry point feature is correctly handled inside GDB and respective compiler= s. - Nils > -----Original Message----- > From: Kevin Buettner > Sent: Friday, April 8, 2022 10:37 PM > To: Nils-Christian Kempke via Gdb-patches > Cc: Kempke, Nils-Christian > Subject: Re: [RFC][PATCH 0/1] Fortran entry and DW_TAG_entry_point > = > Hi Nils, > = > I skimmed the dwarf2/read.c part of the patch; I think it looks > reasonable, though I'd prefer that the comment introducing > add_partial_entry_point() not refer to Fortran entry points. > (DW_TAG_entry point could be used for other languages too, right?) > > As for the test case, I think you should use the DWARF assembler to > make a test case which uses DW_TAG_entry_point. That way we don't > depend on having a compiler which outputs the correct info. This test > case would be placed in gdb/testsuite/gdb.dwarf2 instead of > gdb/testsuite/gdb.fortran. > = > You can find existing test cases which use the DWARF assembler by > searching for "load_lib dwarf.exp" in the .exp files in > gdb/testsuite/gdb.dwarf2. At present there are nearly 200 .exp files > which contain this line, so there are plenty of examples. > = > Kevin > = > On Wed, 23 Mar 2022 11:53:18 +0100 > Nils-Christian Kempke via Gdb-patches > wrote: > = > > Hi, > > > > please find attached a patch that enables GDB to parse the > > DW_TAG_entry_point DWARF tag. > > > > It was already sent to the mailing list a while ago but got lost in > > review (see the commit message of the attached patch). > > > > The patch was originally written with ifort in mind, the only compiler > > we know of, that actually emits the DW_TAG_entry_point. It is used to > > describe alternative entry points to functions defined with Fortran's > > 'entry' keyword. With this patch it becomes possible to define and hit > > breakpoints in an executable that uses the 'entry' feature and has been > > compiled with ifort. > > > > Gfortran and ifx actually follow a different way to describe Fortran en= try > > points. Both emit a DW_TAG_subprogram instead. > > > > Sadly, the DWARF emitted by ifort is not quite correct for the given > > test (or any other entry point test we tried). Some parameters of > > subroutines and entry points have a wrong DWARF location description. = So > > even though hitting breakpoints is possible in the test, printing of the > > passed variables fails and running the test with ifort will still produ= ce > > FAILs. > > > > With this in mind, we were unsure what to do with this patch, thus the = RFC. > > On the one hand we did not want the patch to be lost. On the other hand > the > > compiler the patch was written for has some issues in its emitted DWARF > > and we do not know when these issues can/will get fixed. > > > > Note, that the attached test only fully passes with gfortran. Ifx, whi= le > > able to define breakpoints at entry points, also has issues producing > > correct DWARF for entry points (using the DW_TAG_subprogram > approach). > > > > The patch was tested with the standard board, unix/-m32, > > navtive-gdbserver and native-extended-gdbserver and we did not find any > > regressions with these. > > > > Any feedback is highly welcome. > > > > Cheers! > > > > Nils > > > > Nils-Christian Kempke (1): > > dwarf, fortran: add support for DW_TAG_entry_point > > > > gdb/dwarf2/read.c | 101 ++++++++++++++++++++++ > > gdb/testsuite/gdb.fortran/entry-point.exp | 67 ++++++++++++++ > > gdb/testsuite/gdb.fortran/entry-point.f90 | 48 ++++++++++ > > 3 files changed, 216 insertions(+) > > create mode 100644 gdb/testsuite/gdb.fortran/entry-point.exp > > create mode 100644 gdb/testsuite/gdb.fortran/entry-point.f90 > > > > -- > > 2.25.1 > > > > 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 Sil= va > > Chairperson of the Supervisory Board: Nicole Lau > > Registered Office: Munich > > Commercial Register: Amtsgericht Muenchen HRB 186928 > > 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