From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id klJJNNfjfGJo1wUAWB0awg (envelope-from ) for ; Thu, 12 May 2022 06:39:19 -0400 Received: by simark.ca (Postfix, from userid 112) id C23271E220; Thu, 12 May 2022 06:39:19 -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=RswPdLSI; 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 B61581E01D for ; Thu, 12 May 2022 06:39:18 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4399038438E6 for ; Thu, 12 May 2022 10:39:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4399038438E6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1652351958; bh=FGB+J2WYrbDlhbMv27+PBK6qOkzpS+ea6JPt70ZQ+M8=; 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=RswPdLSIj4jL+bypPVvvkqaaOpHada6OrW6M/K8jgaf7ISkpSpcy0MAuzzrL53xxT 1eYL8dlg3/IEi/TOuvAh/Hpy34dKQOl7cuN3SzDGHu2crPbazmKVwxzhOLcJ8ayFqC btIh6rv6VjFxVX2/3J5raZx2O0aQE24EEvcrRV+c= Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by sourceware.org (Postfix) with ESMTPS id B3692385742D for ; Thu, 12 May 2022 10:38:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B3692385742D X-IronPort-AV: E=McAfee;i="6400,9594,10344"; a="269902121" X-IronPort-AV: E=Sophos;i="5.91,219,1647327600"; d="scan'208";a="269902121" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2022 03:38:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,219,1647327600"; d="scan'208";a="572474463" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by fmsmga007.fm.intel.com with ESMTP; 12 May 2022 03:38:54 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) 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; Thu, 12 May 2022 03:38:54 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Thu, 12 May 2022 03:38:54 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.100) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Thu, 12 May 2022 03:38:54 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UkNoyJCIu2IgO//AXc2FqDfFJ+RB3058XmQLgcADbYlEtP2ArR3IclSoJ+JQS106p508190xfakz6siKrHehR2mGLjPy0keVKuYBX4f6Y1RKZ0SaRwgG3lApkFzOVyAb8LofaKWvIoZ1UKm4IZ/Hfpw7FFhA2AnkOWdkVEsst/evzSRR7J6NKA410z/HAyVXrWAFR18l4m6LCvfqTTBhNaEGttBl8pzAiXzU3r5TYlYU7Fcm/aKvF+cz1pfqzRgWv1m2QYyEM2iuE1BY0dhdEA0TDfJzDkLriJCWdtycpY6XSPj2X7i4VM9yZcWssPev8kvvJ0LWhbFh5PowZJEq5g== 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=+5Dfc5VJcsq5QXd9pi7Ge/WpE/O9uO/ngjORbud3+Xc=; b=V/sBrq54zgCCLSVkfMLVxZFYWrb7LYChAwD3APkikz+D8Z3TZU0CMxVV48q0PsG0yqKHMnzZXDi1DGZklKGtYQe6QqOlpmqcWMpppUtrNBJ01Km2SjVvh7V5FBfa0Dpbw27BIL9R0F/rZDEAAXnHTuh0hHAQwkqyY7Letwseee03KYyojQQNzlMNodLuOYOYZg+kkVBUgDzyl6BKyHdpzItQ92Hf6vVtBcx1ZyrCKXWbgdlmVFIOU+1GgmaqELQ2RyAPbKD8/NN7BBogkiokeYkH4siiDIYAc7YlKB8hS/miHBqTU/bKslHUAqo3OJMbufVWCt8N+O0wZ5RKtxxn/g== 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 CY4PR11MB1701.namprd11.prod.outlook.com (2603:10b6:903:22::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.13; Thu, 12 May 2022 10:38:53 +0000 Received: from CY4PR1101MB2071.namprd11.prod.outlook.com ([fe80::403f:f9f0:74f2:c5b9]) by CY4PR1101MB2071.namprd11.prod.outlook.com ([fe80::403f:f9f0:74f2:c5b9%10]) with mapi id 15.20.5250.014; Thu, 12 May 2022 10:38:52 +0000 To: Tom Tromey , Nils-Christian Kempke via Gdb-patches Subject: RE: [PATCH v2 1/1] dwarf, fortran: add support for DW_TAG_entry_point Thread-Topic: [PATCH v2 1/1] dwarf, fortran: add support for DW_TAG_entry_point Thread-Index: AQHYT+PlYwi1BeSeQUyzdPLbJzVXa6zxGw1mgCoRBWA= Date: Thu, 12 May 2022 10:38:52 +0000 Message-ID: References: <20220414094108.2758482-1-nils-christian.kempke@intel.com> <20220414094108.2758482-2-nils-christian.kempke@intel.com> <87v8va1i4w.fsf@tromey.com> In-Reply-To: <87v8va1i4w.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.401.20 dlp-reaction: no-action x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5d99df3b-85b5-4287-3701-08da34039bc6 x-ms-traffictypediagnostic: CY4PR11MB1701: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: HwRjn9FXZoLvphA/guJ5CB0j5/Ka/oyMDxjxJDAcKqAdLciVQlRdsk+mH6WCzz6EoC6EFFMPm8YKFeSrp8WKptA9GoeWQXO/j9SQZJkJnYXWEic/sorUnbeVOTI83Ro0x5HewOmOYbJS1JyphKn0/BwJAT2ls9xG6qH0NiEK4Jih8CEadpXs5Tbf8APp46p/z0a3Sr7yK/HNHJrwtUFuXi+i7df4DgJ6pvnnIwBdOQKKGrgLuijaa42JBDRomoxdkHJGZ6nPQbXoGu9ly1aYi0g4zws1kKCn5//OPXLP/6HlxPqH2D0nPmSqs1rVOOg3nuyXpPqDQFRVFYtdpTinjMPakCBvFaeYhXs/5wOJHSIpxY4ZESId5etYimY5E6Xk0xRXOj3OshVL+5yX0R15ye7L1bn8rYtgDdOm6GmmbKorf2wSiS3dOWu2rJhsktUcQdVlGN/FU2VsNwKOrJk/9zsA1hxji0jzHNVLFiomATF3SKzRtJfup8c83krRVO4AdDNqus47JRea1POPagj3b2myeJfk20ua6u3EHuQXvPVstwwYn7yNuy2Nr9QwDfGDlrJJpfI/bmOQcfIkyfbMpMMZ7oFwo9PEJLqDLSkDVNcJZL/ogsxFYdBpsXlPdhQgjPHmP4cr41ckHJgIBuQvG+UGh20RuYbGAaTtPfKnLF7Ge2HOOuurDXoMoxrYCGy0//mmiu1CMusRDgi3n7srCg== 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)(66946007)(64756008)(82960400001)(38070700005)(316002)(86362001)(66476007)(186003)(8936002)(122000001)(508600001)(38100700002)(5660300002)(107886003)(71200400001)(83380400001)(55016003)(54906003)(110136005)(52536014)(4326008)(7696005)(66556008)(6506007)(9686003)(26005)(53546011)(66446008)(8676002)(33656002)(2906002)(76116006); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?W5TyIsbTMAIO/WxJX5garOnGnj33Vbgs8SpvsId/xoo56X06Y3U6BJ59Gh51?= =?us-ascii?Q?aloUI1yeKIIHDLHPrPMZyjZIJwYvSxTH6KAo5Jf1mgpYiwEPqaXBNsMCCe6a?= =?us-ascii?Q?honWfUkFWWXtXAwDucwg0MXHbwqHcOqZeSLF2XUla1F7AGshZDkJLYhmRSG8?= =?us-ascii?Q?GrJa7aSKvVcdQq6r3eAN9A10d3TKvMOlgq0QCcdtprH6AVfne8L8+OmH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0oqdO/cwo2Njsc6msMD8yEu+p4iIZJcr8aJX7h31L?= =?us-ascii?Q?mOWmoTHYfVARcWiFcws0t5G2e80F/vHaCd65inTT8eDbbvCJ0m1fT2PRM50T?= =?us-ascii?Q?8UA1X7gKdeJNEXrSWAf2UzWyOU3sllSLO+qoU4vLxJbrAz/P1w9+zzNDB9TK?= =?us-ascii?Q?GwfBS0NOmvOsEdMiRFla9hVQwQL9RVSpFwmzRSSxWsgS0St9+UN/V6hVRZSN?= =?us-ascii?Q?lHQqWrYNrpaF6PkXw5jZI2C6/oJIsk5hk2Wl1/w8M6CZjBFg9e5k35tlYKrW?= =?us-ascii?Q?esXSof02si1gJYkeQ3hF5vpyyCDDxU8c0roaR9B1J/kMD6MHj5VrVJrRhxe3?= =?us-ascii?Q?HDeUQe+hSJkxqijzqBcHiryxdNvhDj0u55J+TDQ2/wA5ibS6Lx7iYAVF75O/?= =?us-ascii?Q?HRLiWZgnDESqymzYGYh0kGDgLFj2p4kkspDYe2jISHNf2fHY2hAI0URk2TYZ?= =?us-ascii?Q?j5E6dhJMEiLGFhjnx+CR8Q3O+G3sF64MBy7moZr/ZZdhZhCFV9cppbb/G4kB?= =?us-ascii?Q?b4VvCpYSADIqIhr3yVmsAxaqJJPiua2tOxskrkI0BzQ8CEGct6rLSuON6Vt8?= =?us-ascii?Q?iVy+LrLmf7AJiFc1jAQwk7T/URuQ/chQfmJoQ3oVGHMACVi4UcbrdK96z/Cs?= =?us-ascii?Q?n9X8AbmY2azFVe2U+4LfhFcm8O3HiTU=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: 5d99df3b-85b5-4287-3701-08da34039bc6 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 May 2022 10:38:52.9038 (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: tSExOn04P3Y01n6Y+C7B2CKhTy4p9ZYmvv6g+yhxCUAnJ8TSBGCO2yiUHmF4AjTAFowlSX8PLui54fOerp2tugx/k1qtY2qWPAWXboLNN3s= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR11MB1701 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" , Bernhard Heckel , Tim Wiederhake Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" > -----Original Message----- > From: Tom Tromey > Sent: Friday, April 15, 2022 5:28 PM > To: Nils-Christian Kempke via Gdb-patches > Cc: Kempke, Nils-Christian ; > jinisusan.george@amd.com; Tim Wiederhake ; > Bernhard Heckel > Subject: Re: [PATCH v2 1/1] dwarf, fortran: add support for > DW_TAG_entry_point > = > >>>>> Nils-Christian Kempke via Gdb-patches patches@sourceware.org> writes: > = > > diff --git a/gdb/dwarf2/abbrev.c b/gdb/dwarf2/abbrev.c > > index 2db5ea15ac..3b47987a0e 100644 > > --- a/gdb/dwarf2/abbrev.c > > +++ b/gdb/dwarf2/abbrev.c > > @@ -88,6 +88,7 @@ tag_interesting_for_index (dwarf_tag tag) > > case DW_TAG_base_type: > > case DW_TAG_class_type: > > case DW_TAG_constant: > > + case DW_TAG_entry_point: > > case DW_TAG_enumeration_type: > > case DW_TAG_enumerator: > > case DW_TAG_imported_declaration: > = > I wonder what happens if this is removed. > = > If it's needed I suppose I would expect some other changes to the > indexer. Like maybe cooked_indexer::index_dies has to handle it, or > cooked_index_entry::matches(search_domain). > = > Tom Hi Tom, So, I have tried this and without this line we'd loose the possibility to do do something like gdb ./outputs/gdb.fortran/entry-point/entry-point (gdb) b foo Breakpoint 1 at 0x404202 ..., line 33. Removing it would show (gdb) b foo Function "foo" not defined. Make breakpoint pending on future shared library load? (y or [n]) n I am honestly not quite sure about the two parts you pointed out. What I think I understand it this: In cooked_index_entry::matches(search_domain) we could add the DW_TAG_entry_point to the FUNCTIONS_DOMAIN (similar to DW_TAG_subroutine). Not sure if this would be wanted but I think this is quite reasonable. Entry points are virtually like separate functions with their own argument lists. I am not sure what this would actually change within GDB though - commands like 'info functions' and 'info module functions' (gdb) info functions All defined functions: File .../entry-point.f90: 33: void bar(INTEGER(4), INTEGER(4), INTEGER(4), INTEGER(4)); 44: void foo(INTEGER(4), INTEGER(4), INTEGER(4), INTEGER(4)); 50: void foobar(INTEGER(4)); 19: void mod::MOD(void); 20: void mod::mod_bar(void); 25: void mod::mod_foo(void); 59: void testentrypoint(void); (gdb) info module functions All functions in all modules: Module "mod": File .../entry-point.f90: 19: void mod::MOD(void); 20: void mod::mod_bar(void); 25: void mod::mod_foo(void); Seem to be ok without this as well. But maybe it still makes sense to add i= t here? The other part you mentioned is cooked_indexer::index_dies. I think here the change you meant is to recurse the entry if it is a DW_TAG_entry_point? In = my understanding this would then also index possibly interesting child DIEs, r= ight? Here, I am not sure whether a DW_TAG_entry_point can even have interesting child dies. It will not possess any other DW_TAG_entry_point/DW_TAG_subprog= ram tags I think. So far I only know it can have DW_TAG_formal_parameter, DW_TAG_unspecified_parameters and DW_TAG_common_inclusion. But I guess it would not hurt to also add it here and it might catch child entries that= I do not think of right now. I hope I understood this part correctly. Currently, I am inclined to add the DW_TAG_entry_point to the functions dom= ain, about the second change I am not quite sure (currently DW_TAG_subprogram ta= gs are only recursed if the language is ada/fortran. 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