From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 2X6QJj/Ue2KSqgUAWB0awg (envelope-from ) for ; Wed, 11 May 2022 11:20:31 -0400 Received: by simark.ca (Postfix, from userid 112) id 90F2E1E220; Wed, 11 May 2022 11:20:31 -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=Ph0XCKrR; 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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.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 8AEFB1E00D for ; Wed, 11 May 2022 11:20:30 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A0AFF3835C3C for ; Wed, 11 May 2022 15:20:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A0AFF3835C3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1652282429; bh=vxsS42gA6dpd9ky7pQB3/fUXL82QmpQI45lQPRgH+34=; h=To:Subject:Date:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=Ph0XCKrR9P7ZdrRUxJw+8cGh1A2kEo9vzoh5dudnh7RnHjOOIn6rqQMsuoVSTYdg/ NmXhk5WnKSMrmbo5NDpFKYvv39PsOEzCgV/IACQLaMwAXCCN/NzFqMoEnt1i2NLGsV vmOvWSXaa4OPFTxnSbZ628UGPQFjDXxuX2WszHDY= Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by sourceware.org (Postfix) with ESMTPS id 06B273856271 for ; Wed, 11 May 2022 15:20:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 06B273856271 X-IronPort-AV: E=McAfee;i="6400,9594,10344"; a="251780238" X-IronPort-AV: E=Sophos;i="5.91,217,1647327600"; d="scan'208";a="251780238" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2022 08:20:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,217,1647327600"; d="scan'208";a="711520840" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga001.fm.intel.com with ESMTP; 11 May 2022 08:20:03 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 11 May 2022 08:20:03 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 11 May 2022 08:20:02 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Wed, 11 May 2022 08:20:02 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.47) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Wed, 11 May 2022 08:20:02 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fWqH+bBZt4kX+qiILSeb3wqX8U8VFktxbSrExeWEHsu5WokXAuXZox76f+ogR96/NdkU7rBjCGRISYM85gl0Kym3SIA/LYOXo0k1vRnwADn1rgU5RES2mrYvgMbfq0c6vxlmbEAJ4u+zGmNPJCJgu5zsBLYyZR1Pv0CN9IhqpLzBebYh7BdrCFAYnUSc78lub03jtB0AHJsUpu2jOlEnuDtsz/2ioExTB+4h6ua9pEzzOf+MDdEmVILFPIpHjB/mJAQRzMzNSJSdlmRybBUqIorWVkKTtt2BR++rf1FrVnTzdbCy2Kv08O7S/csule2pY4aDcoMCaozjqN7SIJhwaA== 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=J8UwcO+4+wwi+0c1vlQwOGQMv74CpucyEMhuMFcpOlI=; b=KvuVEx3TC2owRHEEd3Ka+tbsTW80OvadOg7T8hIieN9Nu0yrBqCpm0cL43fasr1Q6FSoWyOKlYBEcxvtl+hE5L3tWYOwBK29xKd4Qm+FjAhEXt0AN4du3AQV2IGGzSkBpuuHz8uJknNc+smIxC8WIqrdLDsilpzzWVeD5tWt2ikwp/6qPyQwUc9bL4Qcg6oGU0PRYH7x39iWunEn4a8Pvmc+ve2ihlz9ugRTC06cq+n35O2N4pVePCRTedYz1gEaG1QYNOEtFIlf5wXjiLa2Km6oXir+JWWjz75Lvq/iYf+ZO7hc19QalcHNegYKf2ARB4C6o0uMYQC4NT3UCoGYCQ== 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 DM5PR11MB1420.namprd11.prod.outlook.com (2603:10b6:3:11::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5227.21; Wed, 11 May 2022 15:20:00 +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.013; Wed, 11 May 2022 15:20:00 +0000 To: Andrew Burgess , "gdb-patches@sourceware.org" Subject: RE: [PATCH 13/18] testsuite, fortran: fix info-types for intel compilers Thread-Topic: [PATCH 13/18] testsuite, fortran: fix info-types for intel compilers Thread-Index: AQHYZHne4/ymlWBrvkCCRr2YwCAvkq0ZliGAgAAp/GA= Date: Wed, 11 May 2022 15:20:00 +0000 Message-ID: References: <20220510142437.1397399-1-nils-christian.kempke@intel.com> <20220510142437.1397399-14-nils-christian.kempke@intel.com> <87zgjojmt8.fsf@redhat.com> In-Reply-To: <87zgjojmt8.fsf@redhat.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: 3a1bc28d-5247-4fc4-0e3f-08da3361b765 x-ms-traffictypediagnostic: DM5PR11MB1420: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: UsBqXOQTgp37YmbSvolEnWZNK/Lcmy6B2RVfsJjF7tek7yADN3XjQcSXpMUT8LDO/wvGZXew570IxKJ5gKmyy1NH7OFd2Ej/qH98YbD1CxqJgTm7Vvaj5lhbkGCzCzK3PHi8YQFRqMixblm6j8rfo9R6hLBO137SsrtVeux5DewDTYZB5n7/ZK640BHQS7FVBz1j10ddcXTtSRGRcV01Vi3fcMFuNNh+z96Lqokqnd/DbCrHePhxvVoEYhFv4l+iGh1I6w5HAj0n/mo30KfKRmYSc9O8INlLgYYDwBw9G7kIJnUFW4jAGIu8ulS9cDlGpIt6gGBAehfvHTeTTL0OOLDw1WF5w6u5/lgxQmPMdXcaP69OefrSAAkVaGaqXWcaJ+eSSh/pTL5mDE4OyvEUr7TVcHgih6LQbHZP0rBDZ+FDr+Z4yXGSxvJlL5j6mx2eY1C8xGUStdhHdg1KRZO6MoIxG2wkLsaQvwgBuP61qfWOEAJUbKdckXtoSxJQh6EUGDTQVEEeZ1TpNJ92tEWAXN1EovvjPdtRwWk/yAa3v+ucDG8h0o0XM3dJpQhZ3lX3rA1eLmjRW2Qzov385hDZf+iYiNMI9X4r47+v2SU3T2VWm92J63A/UIgwGI8fdCjFndNbqqocvOkQ8jSag8aJJVPvnnpQgewIJrQ0s+mfUTTJteptuxUd/NRT+29xi/q1TsDTIryFoZDjCowsO760tNnlEsqzOh2yZ6F3U2x0zMDC596vazNPQtVv1saDg5m/l5glCkdQkl5wwNMjSgRtZYYi8cFtHsWppLjtRgyvrn8= 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)(508600001)(186003)(9686003)(52536014)(55016003)(8936002)(71200400001)(8676002)(110136005)(76116006)(33656002)(2906002)(66446008)(64756008)(66946007)(66556008)(66476007)(82960400001)(83380400001)(7696005)(316002)(6506007)(86362001)(38070700005)(122000001)(5660300002)(966005)(38100700002)(26005)(53546011); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?SlUN9NMANDf8rAF9SrCLRNWhC9JgvDUj+OHGsDb7ANJYnuENq1dekk1/KHOR?= =?us-ascii?Q?oiv+aEMk2X52F2hHVq7NMYG4oqnsu4ujjMs4MIYjEDYPZrs7ItACROcHcVGC?= =?us-ascii?Q?HBGFaFX6oi9OSDDxoi8v+RvarIXO3bxZz7TNJiQI3daSx43bOf3mX8YUAwRw?= =?us-ascii?Q?AAOjCXm+hiSY+yZDHHeX8Kl07axRz75htD++82mIBeNMdhQUBScdmh4s+QuG?= =?us-ascii?Q?7TVWOyxjx5xYv0CT7XUc0tQeSeC5qFoXmoi2Xvsx+lg6dKWE+WDVMY6o9lUi?= =?us-ascii?Q?cmywYpbzWPaCdVcHf2SH5QgODlyllxGygjv+aKyaOCcYaA17LN6XN6DDLF+X?= =?us-ascii?Q?Z5C58piC6nxCEerD1pOboPasZ6RKgYGO0iCC93G4c8Ch3OvQ/EPhmFQrNvIK?= =?us-ascii?Q?hSPlvbwuVRK4C24T0XbzaZRKS+rVLfvGNC3XFgQanO9jcKL+/6Wv9Wfhzn1H?= =?us-ascii?Q?MoaTyxlWxkUZiw8P3F11WQfGPN10lXRzBXRaVPIHD8mWGrWlEdtTRs87bUjN?= =?us-ascii?Q?2AIv5TCxOxCbTw2+j5EfaCi+8QAQ+mfO8eEIdEzkp8QMeEzN66HJQmdo/INQ?= =?us-ascii?Q?O8UswMC+5nyroRwhiumloMTxl7n93wTLUVtqKMzvT7kjT8UuWnUdNSDgkraU?= =?us-ascii?Q?Mq08NqaLixVcGUIFZqnKFxFK0fUsuCF6qsCdK8U/c1xDE2pKTNypjt6vJe+R?= =?us-ascii?Q?YDFwkixENnfxbssi1SPR9PZZzmrsJhfY97+daZIdksKNoswngoovgB1PBhUC?= =?us-ascii?Q?Dy2H3PfTHdlscDf15nn0VC1LlFd1cXlVDDttRUcfWrbRJefOLvFuHlQf5Qpy?= =?us-ascii?Q?8Qayw8ApxN7w96SUtKmK0Qt6QuDjSKCHa8Lpr76+rurfsRWA+HSzo4tUDO9m?= =?us-ascii?Q?WYMw7AcY1re3c722mbPGbkUd5QyM9YrsivPxkRYNOiS8jUZDF/fdNPZhLJBY?= =?us-ascii?Q?D5b5is+5uGuzHOHpcC0x/5N2GhSutHXcTBdYBMKCmI6pJvqT0W4T4FbgC7Ds?= =?us-ascii?Q?OkAvMFYqqX+0jeKyGFfFYIR9HfCgRu8/38zhp0AJz1o2CrhZddrzJvlOhzrq?= =?us-ascii?Q?qQ3R+j2S+XzuvCWLnQxMT/mzFmW9tnm01PgJdGtaZKNhWRw+MTzsoLQvvwiN?= =?us-ascii?Q?NbIdmlymnngzmOXtwNsPZ5kImIuhvbMvkJbqcadvB6JxT+NIugasZV2rsfMa?= =?us-ascii?Q?SO9u7JW/m1gTZC7bmi7nPNrc7jubWpP8Aj8ZMGxEhK/mM/grarG+VxVRtoMp?= =?us-ascii?Q?xmTAnPpSmsPMDUe0i4kaKf3K8C703rSRDTK0oz7nkAkYq4HzQ17Nykk+AzzP?= =?us-ascii?Q?HhOZFTsXbINkpRGwFAmLo4g+7Y7nnbdv774qtZpDFFy56/DmS0burjdCImDZ?= =?us-ascii?Q?2Su1l/20l6Zsj1bBBSSFwHakrnWGaV2d/7EaX61HkWkso4rLZbqldnEGD54z?= =?us-ascii?Q?Q13RQi+URYbzIGlORMrLyI4SEs95lDv0mexhzuNknCDpe4xt/qoFDAqugti8?= =?us-ascii?Q?2esEasbzfGuxT2d+pVb9x22o//u0GxI1qf1MZmZSMU6X1kUWFbYB0WaCOh21?= =?us-ascii?Q?wF/nWzTnkqZwt6wQjnj81rfZqhMPPEjNTGunumadL8BcgIj5wOSQ0fLqb+7X?= =?us-ascii?Q?OlQ39esj6zgg1q0A/RgBYypf/b8/7A2ihIShYildCxQMPEseKbOyFZXD/xwf?= =?us-ascii?Q?9QZJLyajjyC9xL6z7BBTgwOoOHd/Rp8dCuc26LBqlTMVk/xnboi2o/w2+BaW?= =?us-ascii?Q?RAilH3v5TezaF9V4qrU65LDTzWPhaIU=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: 3a1bc28d-5247-4fc4-0e3f-08da3361b765 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 May 2022 15:20:00.7575 (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: KPn3gB1PvlSPEbqJN56Yi828D2oUBEEViRot6yioDb/ynFuHZySJDrOfYqRZtxDNOyaUXRv3K1l5KyHPvhwhslnmvyTD5YWxltOeicwr+1s= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB1420 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" Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" > -----Original Message----- > From: Andrew Burgess > Sent: Wednesday, May 11, 2022 2:06 PM > To: Kempke, Nils-Christian ; gdb- > patches@sourceware.org > Cc: JiniSusan.George@amd.com; Kempke, Nils-Christian christian.kempke@intel.com> > Subject: Re: [PATCH 13/18] testsuite, fortran: fix info-types for intel > compilers > = > Nils-Christian Kempke writes: > = > > First, the emitted symbol character*1 which is checked in the test > > is not even referenced as a type in the compiled examples. It seems > > to be a gfortran specific check for some type that gets emitted always. > > I changed the test to use check_optional_entry here to allow the > > symbol's absence. > > > > Second, the line checked for s1 was hardcoded in the test. Given that > > the type is actually defined on line 41 (which is what is emitted by > > ifx) it even seems wrong. I changed the line check for s1 to actually > > check for 41 and a gfortran bug has been filed here > > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105454 > > > > The test is now marked as xfail for gfortran. > > > > Third, the test was checking for s1 to be emitted by info types. This > > would mean that the type is put into compilation unit scope in the DWARF > > but, as it is local to the main program this is actually not expected > > and gfortran specific. > > Since I already added the xfail for gfortran here, I opted to also make > > this check gfortran specific. > > --- > > gdb/testsuite/gdb.fortran/info-types.exp | 10 +++++++--- > > 1 file changed, 7 insertions(+), 3 deletions(-) > > > > diff --git a/gdb/testsuite/gdb.fortran/info-types.exp > b/gdb/testsuite/gdb.fortran/info-types.exp > > index 67fe4d79c5..06770aada1 100644 > > --- a/gdb/testsuite/gdb.fortran/info-types.exp > > +++ b/gdb/testsuite/gdb.fortran/info-types.exp > > @@ -41,12 +41,16 @@ set real4 [fortran_real4] > > GDBInfoSymbols::run_command "info types" > > GDBInfoSymbols::check_header "All defined types:" > > > > -GDBInfoSymbols::check_entry "${srcfile}" "" "${character1}" > > +GDBInfoSymbols::check_optional_entry "${srcfile}" "" "${character1}" > = > Could we not just add a reference to character*1 type? I'm happy to > take this change, but just adding a use might make a stronger test? Yes, I'll do that. It is true, there will be a bit more coverage. > > GDBInfoSymbols::check_entry "${srcfile}" "" "${integer4}" > > GDBInfoSymbols::check_entry "${srcfile}" "" "${logical4}" > > GDBInfoSymbols::check_entry "${srcfile}" "$decimal" "Type m1t1;" > > GDBInfoSymbols::check_entry "${srcfile}" "" "${real4}" > > -GDBInfoSymbols::check_entry "${srcfile}" "37" "Type s1;" > > + > > +if { [test_compiler_info {gfortran-*} f90] } { > > + setup_xfail *-*-* gcc/105454 > > + GDBInfoSymbols::check_entry "${srcfile}" "41" "Type s1;" > > +} > = > Shouldn't the GDBInfoSymbols::check_entry call be outside of the if > block? I think, with your change, the test will _only_ be run on > gfortran, which is not what you wanted. Mh - so actually this is what I wanted. In my opinion emitting s1 here is actually not expected. The type s1 is defined inside the Fortran progra= m. E.g. ifx also emits it as a child of the program - limiting its scope to th= at. Gfortran on the other hand emits it at global CU scope (so not as a child of the program info_types_test). I think the fact that this type is visible v= ia info types is not correct here. But, since this emission is also buggy I did no= t want to delete the test in order to somehow keep track of this line bug. So I changed the test to only test for this type when ran with gfortran. My baseline assumption here is, that gdb in the test only prints types in t= he 'info types' command that are defined at CU DWARF scope. At least it looks like this when compiling with ifx (which, as said, emits the Type s1 as a c= hild of the program info_types_test). When checking this compiled with ifx I see in the DWARF ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <1><1d5>: Abbrev Number: 12 (DW_TAG_subprogram) <1d6> DW_AT_low_pc : 0x4055b0 <1de> DW_AT_high_pc : 0x42 <1e2> DW_AT_frame_base : 1 byte block: 56 (DW_OP_reg6 (rbp)) <1e4> DW_AT_linkage_name: (indirect string, offset: 0x224): MAIN__ <1e8> DW_AT_name : (indirect string, offset: 0x22b): info_type= s_test <1ec> DW_AT_decl_file : 1 <1ed> DW_AT_decl_line : 37 <1ee> DW_AT_external : 1 <1ee> DW_AT_main_subprogram: 1 ... <2><239>: Abbrev Number: 14 (DW_TAG_structure_type) <23a> DW_AT_name : (indirect string, offset: 0x1d4): s1 <23e> DW_AT_byte_size : 4 <23f> DW_AT_decl_file : 1 <240> DW_AT_decl_line : 41 <3><241>: Abbrev Number: 15 (DW_TAG_member) <242> DW_AT_name : (indirect string, offset: 0x207): a <246> DW_AT_type : <0x1ce> <24a> DW_AT_decl_file : 1 <24b> DW_AT_decl_line : 41 <24c> DW_AT_data_member_location: 0 <24d> DW_AT_accessibility: 1 (public) <3><24e>: Abbrev Number: 0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ So s1 is being emitted but as a child of MAIN__. With gfortran on the other hand I get ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <1><2ec>: Abbrev Number: 18 (DW_TAG_structure_type) <2ed> DW_AT_name : s1 <2f0> DW_AT_byte_size : 4 <2f1> DW_AT_decl_file : 1 <2f2> DW_AT_decl_line : 37 <2f3> DW_AT_sibling : <0x302> <2><2f7>: Abbrev Number: 4 (DW_TAG_member) <2f8> DW_AT_name : a <2fa> DW_AT_decl_file : 1 <2fb> DW_AT_decl_line : 42 <2fc> DW_AT_type : <0x2bf> <300> DW_AT_data_member_location: 0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ emitted as a child of the whole compile unit. It might be, that this is actually not the expected behavior of GDB here. But it seems, that types defined as children of subroutines will not be displayed by 'info types'. Similarly, I looked at this in c++ and we have the same here: Compiling ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ int main (int argc, char *argv[]) { struct test {}; test a; return 0; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ With gcc -O0 -g (version 9.4.0) will emit DWARF like: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <1><2d>: Abbrev Number: 2 (DW_TAG_subprogram) <2e> DW_AT_external : 1 <2e> DW_AT_name : (indirect string, offset: 0xb4): main <32> DW_AT_decl_file : 1 <33> DW_AT_decl_line : 1 <34> DW_AT_decl_column : 5 <35> DW_AT_type : <0xf7> <39> DW_AT_low_pc : 0x1129 <41> DW_AT_high_pc : 0x16 <49> DW_AT_frame_base : 1 byte block: 9c (DW_OP_call_frame_c= fa) <4b> DW_AT_GNU_all_call_sites: 1 <4b> DW_AT_sibling : <0xf7> <2><4f>: Abbrev Number: 3 (DW_TAG_formal_parameter) ... <2><6d>: Abbrev Number: 4 (DW_TAG_structure_type) <6e> DW_AT_name : (indirect string, offset: 0xf): test <72> DW_AT_byte_size : 1 <73> DW_AT_decl_file : 1 <74> DW_AT_decl_line : 3 <75> DW_AT_decl_column : 10 <76> DW_AT_sibling : <0xe9> <3><7a>: Abbrev Number: 5 (DW_TAG_subprogram) ... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ So the type of test is not emitted at CU level, but as a child of main. Doing ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (gdb) info types All defined types: File ./c.cpp: char int (gdb) start ... 6 return 0; (gdb) info types test All types matching regular expression "test": (gdb) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ will also not emit the type. So either this is wrong in GDB - or the emission of the type at global level is not quite correct here and should not even be tested. I see that my commit message does not quite cover all this though. But what do you think? 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