From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 61702 invoked by alias); 10 Jul 2019 13:52:17 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 61694 invoked by uid 89); 10 Jul 2019 13:52:17 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=yao, Yao X-HELO: EUR03-AM5-obe.outbound.protection.outlook.com Received: from mail-eopbgr30077.outbound.protection.outlook.com (HELO EUR03-AM5-obe.outbound.protection.outlook.com) (40.107.3.77) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 10 Jul 2019 13:52:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=df0T3sfj5niXdUH1XPEI6yi0uuj2S38+B9aOGwX5avM=; b=9tTPcQg1FyZ2nmRSimaTOckAcjJ25KyHM23uT3zLGsHpkOwiWw38BEemop0YtaQ3B0IVht8wydPMSvRzXuUejQVCOXtr941RuupyxNaxB+jZPw7H/daax6fvG2ZMfQ/J0chK6WtEk6IxIaXjUaCr9UZ2xz2qHzPtD4na4zwHMRM= Received: from VI1PR08CA0178.eurprd08.prod.outlook.com (2603:10a6:800:d1::32) by AM5PR0802MB2596.eurprd08.prod.outlook.com (2603:10a6:203:98::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2052.20; Wed, 10 Jul 2019 13:52:10 +0000 Received: from VE1EUR03FT056.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::202) by VI1PR08CA0178.outlook.office365.com (2603:10a6:800:d1::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2052.18 via Frontend Transport; Wed, 10 Jul 2019 13:52:10 +0000 Authentication-Results: spf=temperror (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; sourceware.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;sourceware.org; dmarc=temperror action=none header.from=arm.com; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of arm.com: DNS Timeout) Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT056.mail.protection.outlook.com (10.152.19.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2052.18 via Frontend Transport; Wed, 10 Jul 2019 13:52:07 +0000 Received: ("Tessian outbound 96ba4cc141ab:v24"); Wed, 10 Jul 2019 13:52:07 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: a61b24c339b1db2c X-CR-MTA-TID: 64aa7808 Received: from 0c6abc368407.1 (ip-172-16-0-2.eu-west-1.compute.internal [104.47.8.54]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id BE45BDB6-6102-42DD-9AC7-F8D231A2BC3D.1; Wed, 10 Jul 2019 13:52:02 +0000 Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-am5eur03lp2054.outbound.protection.outlook.com [104.47.8.54]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 0c6abc368407.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384); Wed, 10 Jul 2019 13:52:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bw06QEyLHxspT8n0fpR3KoPjpW8lRcSR7Hz16kD/fUXq+D4xCFHwoCDq7mDol5+3uaiVI4tmBPeqEnQDnd8uWgl23bNhqu+uN0OdQo5mnZIMSbJIOiMYhxP28SF0+kQvcFshZanXw/iCI6L+wkSPv/vSErQ4iYyt8IIK/lnXLbCK6GiRsOklCwBAuL45aLTivw9QIbx66KK0FMDczRPipsjb4NiVEEpTB0alsbfgIUFLAQ02uOitVGQhVr7Q/srZ1cVv6CBeggu8Y+IG0ns7O4KzJS26HiR2x9V1wl/EQ9Qrfd9XCyMhWqwewa7SPURMAzxCvo8f1UzOLdQ0q5ci1g== 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-SenderADCheck; bh=df0T3sfj5niXdUH1XPEI6yi0uuj2S38+B9aOGwX5avM=; b=AELvFeJcJOoMWYl+uNkeBOO3qcC856nHfnrRzMcmY74QSAzLt3fZYzSpV7pWdrtbYGVhKQM+a25gaypWYS6SOc0zuCGQu2cy3xwtaxu9RLXAoirwCbRTzWOIh9qf86PZoGUSU4EeAuG7t34HC7QdGUpdrWVdgnUA8/vEb1elnjQEz4FpJyajxKFUvri6XPfzSy41xOViDx3H/zlyHi9/7vG+ZGLprmsu3aHGxE0+UCSfAI2/2bx27P2hHaKnnwyf9Y6u3vzUdPySEd+uOFTn9wCQGHqP/BCp7/+Bzv97iRylHP8E9HkBU68i4hU7twKD4WGHulerbCFR2utBSFRd3w== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=arm.com;dmarc=pass action=none header.from=arm.com;dkim=pass header.d=arm.com;arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=df0T3sfj5niXdUH1XPEI6yi0uuj2S38+B9aOGwX5avM=; b=9tTPcQg1FyZ2nmRSimaTOckAcjJ25KyHM23uT3zLGsHpkOwiWw38BEemop0YtaQ3B0IVht8wydPMSvRzXuUejQVCOXtr941RuupyxNaxB+jZPw7H/daax6fvG2ZMfQ/J0chK6WtEk6IxIaXjUaCr9UZ2xz2qHzPtD4na4zwHMRM= Received: from DB6PR0802MB2133.eurprd08.prod.outlook.com (10.172.227.22) by DB6PR0802MB2549.eurprd08.prod.outlook.com (10.172.251.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2073.10; Wed, 10 Jul 2019 13:52:00 +0000 Received: from DB6PR0802MB2133.eurprd08.prod.outlook.com ([fe80::259b:8edf:fb65:2760]) by DB6PR0802MB2133.eurprd08.prod.outlook.com ([fe80::259b:8edf:fb65:2760%8]) with mapi id 15.20.2052.020; Wed, 10 Jul 2019 13:52:00 +0000 From: Alan Hayward To: Simon Marchi CC: "gdb-patches@sourceware.org" , nd Subject: Re: [PATCH 3/7] Arm: Add read_description read funcs and use in GDB Date: Wed, 10 Jul 2019 13:52:00 -0000 Message-ID: <6071A4B3-3D8F-4C63-88FA-0DA2AB506F1C@arm.com> References: <20190705094525.51536-1-alan.hayward@arm.com> <20190705094525.51536-4-alan.hayward@arm.com> <2a5d9c40-e3d9-8827-9301-df4ae4212183@simark.ca> In-Reply-To: <2a5d9c40-e3d9-8827-9301-df4ae4212183@simark.ca> Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com; X-Microsoft-Antispam-Untrusted: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020);SRVR:DB6PR0802MB2549; X-MS-Exchange-PUrlCount: 1 x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:10000;OLM:10000; X-Forefront-Antispam-Report-Untrusted: SFV:NSPM;SFS:(10009020)(4636009)(346002)(396003)(39860400002)(136003)(376002)(366004)(189003)(199004)(6306002)(6512007)(14444005)(50226002)(81156014)(36756003)(81166006)(57306001)(7736002)(5660300002)(6246003)(8676002)(305945005)(76176011)(68736007)(486006)(476003)(11346002)(316002)(4326008)(54906003)(8936002)(86362001)(446003)(186003)(256004)(2616005)(6916009)(478600001)(53546011)(6506007)(102836004)(26005)(33656002)(14454004)(66476007)(6486002)(76116006)(66946007)(91956017)(66446008)(71200400001)(71190400001)(64756008)(66556008)(66066001)(99286004)(53936002)(25786009)(3846002)(6116002)(229853002)(2906002)(6436002)(2004002);DIR:OUT;SFP:1101;SCL:1;SRVR:DB6PR0802MB2549;H:DB6PR0802MB2133.eurprd08.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info-Original: VMrYI0Loo2uMoxDIT3J1Z9P+ToHoq2xAr/xKZ1YtRI4A9fXDj0JP9EjlYPS7hs1PzbyDtOvyMPFqHLK1e9l3X004YatN8T7WZkwcGyhiVKiTybVJIZoRlKUr5J+m/fzBe/xzyWBRdm+L0F3Y44UoYtvOs+NO5Kt59l2AGsDVFGguPRBdihX5ROQMr0sAgzHJmDbwrHG7uZbEBqJqGx8vsxmh+Y/kmFKLXFRun+WVjb418FVdypTMIY4T3wS7Xppm70lEYr4fLvCI58R+sh6MNs9o5Oc9sVU4j2URDJ63xGnHhiO+yhJmPRfujrG9Cu97Hv0U6atDSvyWpD1VOUF49vEHpJ85nsvngR4jkgW2yyHD9amjfwt91TTe2aleKiTNvQMzOdzqO1+h3Fgk5phieYvON6HbltryzgKL7ph1ihA= Content-Type: text/plain; charset="utf-8" Content-ID: <8350611FABCC2846B503431AA41036DD@eurprd08.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com; Return-Path: Alan.Hayward@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT056.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: aa5a2e16-5c58-4143-acbf-08d7053dc84e X-IsSubscribed: yes X-SW-Source: 2019-07/txt/msg00240.txt.bz2 DQoNCj4gT24gMTAgSnVsIDIwMTksIGF0IDA0OjQ1LCBTaW1vbiBNYXJjaGkg PHNpbWFya0BzaW1hcmsuY2E+IHdyb3RlOg0KPiANCj4gT24gMjAxOS0wNy0w NSA1OjQ1IGEubS4sIEFsYW4gSGF5d2FyZCB3cm90ZToNCj4+IFN3aXRjaCB0 aGUgQXJtIHRhcmdldCB0byBnZXQgdGFyZ2V0IGRlc2NyaXB0aW9ucyB2aWEg YXJtX3JlYWRfZGVzY3JpcHRpb24NCj4+IGFuZCBhYXJjaDMyX3JlYWRfZGVz Y3JpcHRpb24sIGluIHRoZSBzYW1lIHN0eWxlIGFzIG90aGVyIGZlYXR1cmUg dGFyZ2V0cy4NCj4+IEFkZCBhbiBlbnVtIHRvIHNwZWNpZnkgdGhlIGRpZmZl cmVudCB0eXBlcyAtIHRoaXMgd2lsbCBhbHNvIGJlIG9mIHVzZSB0bw0KPj4g Z2Ric2VydmVyIGluIGEgbGF0ZXIgcGF0Y2guDQo+PiANCj4+IENhbGwgYXJt X2NyZWF0ZV9tcHJvZmlsZV90YXJnZXRfZGVzY3JpcHRpb24gZGlyZWN0bHkg YXMgdGhlc2Ugd2lsbCBvbmx5IGJlDQo+PiBjYWxsZWQgdGhlIG9uY2UsIHRo ZXJlZm9yZSB0aGV5IGRvIG5vdCBuZWVkIGNhY2hpbmcuDQo+IA0KPiBJIHdh cyBnb2luZyB0byBwb2ludCBvdXQgImNhbGxlZCB0aGUgb25jZSIsIGJlY2F1 c2UgaXQgc291bmRzIHN0cmFuZ2UgdG8gbWUsDQo+IGJ1dCB0aGVyZSBpcyBh bm90aGVyIGluc3RhbmNlIG9mIG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aGVtIGluIHByYWN0aWNl IGlzIHRocm91Z2ggc29tZSBzZXJ2ZXIgdGhhdCBvbmx5IHN1cHBvcnQgZGVi dWdnaW5nIG9uZSBhdCB0aGUNCj4gdGltZSksIGJ1dCBpdCBjb3VsZCBjaGFu Z2UgZXZlbnR1YWxseS4gIEZvciBleGFtcGxlLCB3aXRoIG11bHRpLXRhcmdl dCwgeW91IGNvdWxkDQo+IGNvbm5lY3QgdG8gdHdvIG9mIHRoZW0uICBTaW5j ZSBpdCdzIG5vdCByZWFsbHkgZGlmZmljdWx0LCBJJ2QgdXNlIHRoZSBzYW1l IGNhY2hpbmcgcGF0dGVybg0KPiBhcyBmb3IgdGhlIG90aGVyIG9uZXMuDQo+ IA0KDQpBZ3JlZWQgYW5kIGRvbmUuDQoNClRoZSBhYm92ZSBjaGFuZ2VzIGFy ZSBnb2luZyB0byByZXF1aXJlIHJlYmFzaW5nIHRoZSBvdGhlciBwYXRjaGVz IHRvby4gSeKAmWxsIHJlcG9zdCB0aGUNCnNldCBhcyBhIFYyLg0KDQoNCkFs YW4uDQoNCg== >From gdb-patches-return-157413-listarch-gdb-patches=sources.redhat.com@sourceware.org Wed Jul 10 14:13:31 2019 Return-Path: Delivered-To: listarch-gdb-patches@sources.redhat.com Received: (qmail 93457 invoked by alias); 10 Jul 2019 14:13:31 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 93443 invoked by uid 89); 10 Jul 2019 14:13:30 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.7 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=23427, prop, U*andrew.burgess, andrew.burgess@embecosm.com X-HELO: mail-wm1-f67.google.com Received: from mail-wm1-f67.google.com (HELO mail-wm1-f67.google.com) (209.85.128.67) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 10 Jul 2019 14:13:26 +0000 Received: by mail-wm1-f67.google.com with SMTP id z23so2435839wma.4 for ; Wed, 10 Jul 2019 07:13:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=fzj4ZWqE2ZX8jqb2gVX/rbbfuQxQpNWC67xFjgjtpLw=; b=IfaqMf05wHa+CByB4W9zDllfmnnnKjywZmRswiu6Y60RBE3J8L/9m2uny+HaY3d2FZ +h+fZydlZmrTdIAdBnVqwwyeVesYX7mWRBkpHeCqi1ZwVZV+3ZJLDljvSbRB7sfMvVF9 0B+nRLdBY9rfurAWLIYH1g03vXy1jjSmm5RPzOWOyre/ftuQsoJ85eQ79FDJp05Pd0OL zQyplZ/BcpJrLWibz+35RGCQzWE/P5+O7HVeEC5HKhXzhceikkKE6e6kLvDahRDzMEuk 9yA5/YijbjJE0LEI1NlWck36Gm/VNBW2LYS4feqfzLkHn+FkEAyclpNs9PHiclJLHnNQ wCKA== Return-Path: Received: from localhost (host86-128-12-99.range86-128.btcentralplus.com. [86.128.12.99]) by smtp.gmail.com with ESMTPSA id o24sm7366565wmh.2.2019.07.10.07.13.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Jul 2019 07:13:22 -0700 (PDT) Date: Wed, 10 Jul 2019 14:13:00 -0000 From: Andrew Burgess To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [PATCHv2 4/5] gdb: Carry default property type around with dynamic properties Message-ID: <20190710141321.GL23204@embecosm.com> References: <3a2c023242f902483cfdaaac9c99f1562534de7a.1557439866.git.andrew.burgess@embecosm.com> <87pnoacnsj.fsf@tromey.com> <20190610222931.GP23204@embecosm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190610222931.GP23204@embecosm.com> X-Fortune: It is illegal to say "Oh, Boy" in Jonesboro, Georgia. X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] User-Agent: Mutt/1.9.2 (2017-12-15) X-IsSubscribed: yes X-SW-Source: 2019-07/txt/msg00241.txt.bz2 Content-length: 29855 Ping! Was there any additional feedback on this series? Thanks, Andrew * Andrew Burgess [2019-06-10 23:29:32 +0100]: > * Tom Tromey [2019-05-22 15:05:48 -0400]: > > > Andrew> <1>: Abbrev Number: 12 (DW_TAG_array_type) > > Andrew> DW_AT_data_location: 2 byte block: 97 6 (DW_OP_push_object_address; DW_OP_deref) > > Andrew> DW_AT_allocated : 4 byte block: 97 6 30 2e (DW_OP_push_object_address; DW_OP_deref; DW_OP_lit0; DW_OP_ne) > > Andrew> DW_AT_type : <0x2a> > > Andrew> <2>: Abbrev Number: 13 (DW_TAG_subrange_type) > > Andrew> DW_AT_lower_bound : 4 byte block: 97 23 10 6 (DW_OP_push_object_address; DW_OP_plus_uconst: 16; DW_OP_deref) > > Andrew> DW_AT_upper_bound : 4 byte block: 97 23 14 6 (DW_OP_push_object_address; DW_OP_plus_uconst: 20; DW_OP_deref) > > Andrew> DW_AT_byte_stride : 6 byte block: 97 23 c 6 34 1e (DW_OP_push_object_address; DW_OP_plus_uconst: 12; DW_OP_deref; DW_OP_lit4; DW_OP_mul) > > > > This is a funny coincidence, because we were discussing a similar case > > with Ada just this week. Gnat can generate very similar expressions in > > some cases: > > > > <1><11b5>: Abbrev Number: 8 (DW_TAG_array_type) > > <11b6> DW_AT_name : (indirect string, offset: 0x1ba2): string > > <11ba> DW_AT_data_location: 2 byte block: 97 6 (DW_OP_push_object_address; DW_OP_deref) > > <11bd> DW_AT_type : <0x113c> > > <11c1> DW_AT_sibling : <0x11db> > > <2><11c5>: Abbrev Number: 9 (DW_TAG_subrange_type) > > <11c6> DW_AT_type : <0x11e0> > > <11ca> DW_AT_lower_bound : 6 byte block: 97 23 8 6 94 4 (DW_OP_push_object_address; DW_OP_plus_uconst: 8; DW_OP_deref; DW_OP_deref_size: 4) > > <11d1> DW_AT_upper_bound : 8 byte block: 97 23 8 6 23 4 94 4 (DW_OP_push_object_address; DW_OP_plus_uconst: 8; DW_OP_deref; DW_OP_plus_uconst: 4; DW_OP_deref_size: 4) > > > > > > Essentially what's going on here is that the compiler represents a > > pointer-to-array as a structure that holds a pointer and the array > > bounds; and then chooses to represent this in DWARF as the above. > > > > This in turn causes problems in gdb. In the above case, it's not > > possible to make a call like `do_something("string")', because gdb > > doesn't know that constructing one of these arrays at runtime actually > > requires two allocations and some special messing around. > > > > So, this week we've been talking about changing the representation of > > these things to be more explicit, that is, make the hidden struct type > > explicit (and marked DW_AT_artificial). > > > > I wonder how Fortran will handle this, or whether it even needs to. Is > > it possible for gdb to construct one of these arrays at runtime? > > > > Another option, besides changing the representation, would be to teach > > gdb how to create one of the above by recognizing the expressions as a > > kind of special case. This seemed uglier and more fragile, though. > > > > For Ada at least, this sort of DWARF isn't the default yet. The default > > is this Ada-specific name encodings scheme; you have to opt-in to DWARF > > using a compiler command-line flag; but one of the things I'm looking > > into is getting gdb to the point where we can flip the default. > > > > Andrew> I wonder if the best solution for dealing with signed properties will > > Andrew> be to move away from an over reliance on fetch_address, and instead > > Andrew> come up with a new solution that considers the current type of the > > Andrew> value on the stack, and the type that the value needs to become; > > Andrew> basically a solution built around casting rather than assuming we > > Andrew> always want an address. > > > > DWARF now has typed expressions as well, so gcc could just emit this > > explicitly, I think. I didn't look at gcc's dwarf2out.c for this but > > maybe you need -gdwarf-5 to make this happen. > > I've seen the typed expressions, but my immediate focus is on > debugging GCC's default DWARF as that's what most folk seem to end up > debugging with. > > > > > Andrew> It is my belief that we can find a suitable default type for every > > Andrew> dynamic property, either specified explicitly in the DWARF spec, or we > > Andrew> can infer an obvious choice if the spec doesn't help us. > > > > Seems reasonable. > > > > Andrew> +static struct type * > > Andrew> +dwarf2_per_cu_addr_sized_int_type (struct dwarf2_per_cu_data *per_cu) > > Andrew> +{ > > Andrew> + struct objfile *objfile = per_cu->dwarf2_per_objfile->objfile; > > Andrew> + int addr_size = dwarf2_per_cu_addr_size (per_cu); > > Andrew> + struct type *int_type; > > Andrew> + > > Andrew> + int_type = objfile_type (objfile)->builtin_short; > > Andrew> + if (int_type != NULL && TYPE_LENGTH (int_type) == addr_size) > > Andrew> + return int_type; > > > > dwarf2_per_cu_addr_type handles unsigned char here, but this one does not. > > I doubt it matters but I wonder why the difference. > > In the places where this is used the DWARF standard specifies that the > property is signed, so there was no need to handle unsigned. > > > > > Andrew> +/* Return a type that is a generic pointer type, the size of which matches > > Andrew> + the address size given in the compilation unit header for PER_CU. */ > > Andrew> +static struct type * > > Andrew> +dwarf2_per_cu_addr_type (struct dwarf2_per_cu_data *per_cu) > > Andrew> +{ > > Andrew> + struct objfile *objfile = per_cu->dwarf2_per_objfile->objfile; > > Andrew> + struct type *void_type = objfile_type (objfile)->builtin_void; > > Andrew> + struct type *addr_type = lookup_pointer_type (void_type); > > Andrew> + int addr_size = dwarf2_per_cu_addr_size (per_cu); > > Andrew> + > > Andrew> + if (TYPE_LENGTH (addr_type) == addr_size) > > Andrew> + return addr_type; > > Andrew> + > > Andrew> + /* Yuck! We currently only support one address size per architecture in > > Andrew> + GDB, which should usually match the address size encoded into the > > Andrew> + compilation unit header. However... we have a few tests where this is > > Andrew> + not the case, these are mostly test cases where the DWARF is hand > > Andrew> + written and includes a fixed address size, for example 8-bytes. When > > Andrew> + we compile these tests on a 32-bit i386 target the gdbarch address > > Andrew> + size is 4-bytes and the above attempt to create a suitable address > > Andrew> + type fails. > > Andrew> + > > Andrew> + As we can't currently create an address type of a different size, we > > Andrew> + instead substitute an unsigned integer for an address. > > Andrew> + > > Andrew> + I don't know if there are targets that have signed addresses and if > > Andrew> + they would need a signed integer here. I figure we'll handle that > > Andrew> + case when it presents itself as a problem. */ > > > > gdbarch.sh makes a distinction between addresses and pointers which, I > > confess, I have never understood. However, based on this, I think at > > least MIPS may have signed pointers. From mips-tdep.c: > > > > set_gdbarch_pointer_to_address (gdbarch, signed_pointer_to_address); > > set_gdbarch_address_to_pointer (gdbarch, address_to_signed_pointer); > > I've extended dwarf2_per_cu_addr_sized_int_type to create signed or > unsigned types, and made dwarf2_per_cu_addr_type use this, taking the > sign of the default 'void *' type into account. This should mean that > MIPS will do the right thing now. > > > > > Also, I wonder whether it wouldn't be simpler to just provide a way to > > create a TYPE_CODE_PTR type with a specified size. > > I wondered about that, but I was worried that it might open a huge can > of worms that I'd rather not open. If we did add multiple pointer > sizes later then it's easy to just change dwarf2_per_cu_addr_type to > do the right thing I think. > > How would you feel with this version? > > Thanks, > Andrew > > -- > > commit 191bf42d636a33c374dbe0b65eb53b7950e49f48 > Author: Andrew Burgess > Date: Wed May 8 13:16:03 2019 +0100 > > gdb: Carry default property type around with dynamic properties > > This commit is preparation for the next one, with the aim of better > supporting signed dynamic properties on targets where the address size > specified in the DWARF headers is smaller than a CORE_ADDR, for > example debugging an i386 application on x86-64. > > Consider this small Fortran program 'bounds.f90': > > program test > integer, allocatable :: array (:) > allocate (array (-5:5)) > array(3) = 1 > end program test > > Compiled with 'gfortran -m32 -g3 -O0 -o bounds bounds.f90'. The DWARF > for 'array' looks like this: > > <2><97>: Abbrev Number: 10 (DW_TAG_variable) > <98> DW_AT_name : (indirect string, offset: 0x0): array > <9c> DW_AT_decl_file : 1 > <9d> DW_AT_decl_line : 2 > <9e> DW_AT_type : <0xaf> > DW_AT_location : 2 byte block: 91 58 (DW_OP_fbreg: -40) > <2>: Abbrev Number: 11 (DW_TAG_lexical_block) > DW_AT_low_pc : 0x80485c3 > DW_AT_high_pc : 0x8b > <2>: Abbrev Number: 0 > <1>: Abbrev Number: 12 (DW_TAG_array_type) > DW_AT_data_location: 2 byte block: 97 6 (DW_OP_push_object_address; DW_OP_deref) > DW_AT_allocated : 4 byte block: 97 6 30 2e (DW_OP_push_object_address; DW_OP_deref; DW_OP_lit0; DW_OP_ne) > DW_AT_type : <0x2a> > <2>: Abbrev Number: 13 (DW_TAG_subrange_type) > DW_AT_lower_bound : 4 byte block: 97 23 10 6 (DW_OP_push_object_address; DW_OP_plus_uconst: 16; DW_OP_deref) > DW_AT_upper_bound : 4 byte block: 97 23 14 6 (DW_OP_push_object_address; DW_OP_plus_uconst: 20; DW_OP_deref) > DW_AT_byte_stride : 6 byte block: 97 23 c 6 34 1e (DW_OP_push_object_address; DW_OP_plus_uconst: 12; DW_OP_deref; DW_OP_lit4; DW_OP_mul) > <2>: Abbrev Number: 0 > > If we look at the DW_AT_lower_bound attribute, which will become a > dynamic property that GDB evaluates when needed by calling > dwarf2_evaluate_property. > > The process of evaluating a dynamic property requires GDB to execute > each DW_OP_* operation, the results of these operations is held on a > stack of 'struct value *'s. > > When the entire expression is evaluated the result is on top of the > stack. > > If we look at DW_AT_lower_bound then the last operation is > DW_OP_deref, this loads a signed address the size of which matches the > DWARF address size, and so in our i386 on x86-64 situation, the top of > the stack will be a signed 4-byte value. > > The problem is how these values are fetched from the stack. Currently > they are always fetched by a call to dwarf_expr_context::fetch_address, > which converts the value to an unsigned value with a length matching > the values current length, before converting to a CORE_ADDR. This > means we loose the signed nature of the property. > > I wonder if the best solution for dealing with signed properties will > be to move away from an over reliance on fetch_address, and instead > come up with a new solution that considers the current type of the > value on the stack, and the type that the value needs to become; > basically a solution built around casting rather than assuming we > always want an address. > > However, before we can start to even think about moving away from > fetch_address, there is a more urgent issue to fix, which is we don't > currently know what type each property should be. We just hold the > value of the property in a CORE_ADDR as returned by fetch_address, and > rely on higher level code (outside of the DWARF expression evaluation > code) to fix things up for us. This is what this patch aims to > address. > > When creating a dynamic property (see attr_to_dynamic_prop in > dwarf2read.c) we can sometimes figure out the type of a property; if > the property is a reference to another DIE then it will have a > DW_AT_type attribute. > > However, the DW_AT_lower_bound case above isn't a reference to another > DIE, it's just a DWARF expression. We don't have any indication for > what type the property should have. > > Luckily, the DWARF spec helps us out, for the lower and upper bounds > 5.13 of the DWARFv5 spec tells us that without any other type > information the bounds are signed integers the same size as a DWARF > address. > > It is my belief that we can find a suitable default type for every > dynamic property, either specified explicitly in the DWARF spec, or we > can infer an obvious choice if the spec doesn't help us. > > This commit extends the creation of all dynamic properties to include > suggesting a suitable default type, all dynamic properties now always > carry their type around with them. > > In later commits we can use this property type to ensure that the > value we extract from the DWARF stack is handled in a suitable manor > to correctly maintain its sign extension. > > There should be no user visible changes from this commit. The actual > fix to correctly support negative array bounds will come later. > > gdb/ChangeLog: > > * dwarf2loc.c (dwarf2_evaluate_property): Update to take account > of changes to field names, and use new is_reference field to > decide if a property is a reference or not. > * dwarf2loc.h (struct dwarf2_locexpr_baton): Add 'is_reference' > field. > (struct dwarf2_property_baton): Update header comment, rename > 'referenced_type' to 'property_type' and update comments. > * dwarf2read.c (attr_to_dynamic_prop): Add extra parameter to hold > default property type, store in property baton, update to take > accound of renamed field. > (read_func_scope): Update call to attr_to_dynamic_prop. > (read_array_type): Likewise. > (dwarf2_per_cu_addr_sized_int_type): New function. > (read_subrange_index_type): Move type finding code to > dwarf2_per_cu_addr_sized_int_type. > (read_subrange_type): Update calls to attr_to_dynamic_prop. > (dwarf2_per_cu_addr_type): New function. > (set_die_type): Update calls to attr_to_dynamic_prop. > > diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c > index c03f261f1e1..88d34eb8660 100644 > --- a/gdb/dwarf2loc.c > +++ b/gdb/dwarf2loc.c > @@ -2443,15 +2443,15 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, > { > const struct dwarf2_property_baton *baton > = (const struct dwarf2_property_baton *) prop->data.baton; > + gdb_assert (baton->property_type != NULL); > > if (dwarf2_locexpr_baton_eval (&baton->locexpr, frame, > addr_stack ? addr_stack->addr : 0, > value)) > { > - if (baton->referenced_type) > + if (baton->locexpr.is_reference) > { > - struct value *val = value_at (baton->referenced_type, *value); > - > + struct value *val = value_at (baton->property_type, *value); > *value = value_as_address (val); > } > return true; > @@ -2471,7 +2471,7 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, > data = dwarf2_find_location_expression (&baton->loclist, &size, pc); > if (data != NULL) > { > - val = dwarf2_evaluate_loc_desc (baton->referenced_type, frame, data, > + val = dwarf2_evaluate_loc_desc (baton->property_type, frame, data, > size, baton->loclist.per_cu); > if (!value_optimized_out (val)) > { > @@ -2497,7 +2497,7 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, > { > /* This approach lets us avoid checking the qualifiers. */ > if (TYPE_MAIN_TYPE (pinfo->type) > - == TYPE_MAIN_TYPE (baton->referenced_type)) > + == TYPE_MAIN_TYPE (baton->property_type)) > break; > } > if (pinfo == NULL) > diff --git a/gdb/dwarf2loc.h b/gdb/dwarf2loc.h > index ac1a771a9f3..baa5762003d 100644 > --- a/gdb/dwarf2loc.h > +++ b/gdb/dwarf2loc.h > @@ -183,6 +183,12 @@ struct dwarf2_locexpr_baton > zero. */ > size_t size; > > + /* When true this location expression is a reference and actually > + describes the address at which the value of the attribute can be > + found. When false the expression provides the value of the attribute > + directly. */ > + bool is_reference; > + > /* The compilation unit containing the symbol whose location > we're computing. */ > struct dwarf2_per_cu_data *per_cu; > @@ -228,23 +234,27 @@ struct dwarf2_offset_baton > > /* A dynamic property is either expressed as a single location expression > or a location list. If the property is an indirection, pointing to > - another die, keep track of the targeted type in REFERENCED_TYPE. */ > + another die, keep track of the targeted type in PROPERTY_TYPE. > + Alternatively, if the property location gives the property value > + directly then it will have PROPERTY_TYPE. */ > > struct dwarf2_property_baton > { > /* If the property is an indirection, we need to evaluate the location > - in the context of the type REFERENCED_TYPE. > - If NULL, the location is the actual value of the property. */ > - struct type *referenced_type; > + in the context of the type PROPERTY_TYPE. If the property is supplied > + by value then it will be of PROPERTY_TYPE. This field should never be > + NULL. */ > + struct type *property_type; > union > { > - /* Location expression. */ > + /* Location expression either evaluated in the context of > + PROPERTY_TYPE, or a value of type PROPERTY_TYPE. */ > struct dwarf2_locexpr_baton locexpr; > > - /* Location list to be evaluated in the context of REFERENCED_TYPE. */ > + /* Location list to be evaluated in the context of PROPERTY_TYPE. */ > struct dwarf2_loclist_baton loclist; > > - /* The location is an offset to REFERENCED_TYPE. */ > + /* The location is an offset to PROPERTY_TYPE. */ > struct dwarf2_offset_baton offset_info; > }; > }; > diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c > index fc3d888fadc..e8d1e3ced18 100644 > --- a/gdb/dwarf2read.c > +++ b/gdb/dwarf2read.c > @@ -1833,7 +1833,7 @@ static void read_signatured_type (struct signatured_type *); > > static int attr_to_dynamic_prop (const struct attribute *attr, > struct die_info *die, struct dwarf2_cu *cu, > - struct dynamic_prop *prop); > + struct dynamic_prop *prop, struct type *type); > > /* memory allocation interface */ > > @@ -1913,6 +1913,10 @@ static void queue_comp_unit (struct dwarf2_per_cu_data *per_cu, > > static void process_queue (struct dwarf2_per_objfile *dwarf2_per_objfile); > > +static struct type *dwarf2_per_cu_addr_type (struct dwarf2_per_cu_data *per_cu); > +static struct type *dwarf2_per_cu_addr_sized_int_type > + (struct dwarf2_per_cu_data *per_cu, bool unsigned_p); > + > /* Class, the destructor of which frees all allocated queue entries. This > will only have work to do if an error was thrown while processing the > dwarf. If no error was thrown then the queue entries should have all > @@ -13759,7 +13763,8 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu) > { > newobj->static_link > = XOBNEW (&objfile->objfile_obstack, struct dynamic_prop); > - attr_to_dynamic_prop (attr, die, cu, newobj->static_link); > + attr_to_dynamic_prop (attr, die, cu, newobj->static_link, > + dwarf2_per_cu_addr_type (cu->per_cu)); > } > > cu->list_in_scope = cu->get_builder ()->get_local_symbols (); > @@ -16515,10 +16520,13 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu) > if (attr != NULL) > { > int stride_ok; > + struct type *prop_type > + = dwarf2_per_cu_addr_sized_int_type (cu->per_cu, false); > > byte_stride_prop > = (struct dynamic_prop *) alloca (sizeof (struct dynamic_prop)); > - stride_ok = attr_to_dynamic_prop (attr, die, cu, byte_stride_prop); > + stride_ok = attr_to_dynamic_prop (attr, die, cu, byte_stride_prop, > + prop_type); > if (!stride_ok) > { > complaint (_("unable to read array DW_AT_byte_stride " > @@ -17733,22 +17741,26 @@ read_base_type (struct die_info *die, struct dwarf2_cu *cu) > > static int > attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, > - struct dwarf2_cu *cu, struct dynamic_prop *prop) > + struct dwarf2_cu *cu, struct dynamic_prop *prop, > + struct type *default_type) > { > struct dwarf2_property_baton *baton; > struct obstack *obstack > = &cu->per_cu->dwarf2_per_objfile->objfile->objfile_obstack; > > + gdb_assert (default_type != NULL); > + > if (attr == NULL || prop == NULL) > return 0; > > if (attr_form_is_block (attr)) > { > baton = XOBNEW (obstack, struct dwarf2_property_baton); > - baton->referenced_type = NULL; > + baton->property_type = default_type; > baton->locexpr.per_cu = cu->per_cu; > baton->locexpr.size = DW_BLOCK (attr)->size; > baton->locexpr.data = DW_BLOCK (attr)->data; > + baton->locexpr.is_reference = false; > prop->data.baton = baton; > prop->kind = PROP_LOCEXPR; > gdb_assert (prop->data.baton != NULL); > @@ -17773,7 +17785,7 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, > if (attr_form_is_section_offset (target_attr)) > { > baton = XOBNEW (obstack, struct dwarf2_property_baton); > - baton->referenced_type = die_type (target_die, target_cu); > + baton->property_type = die_type (target_die, target_cu); > fill_in_loclist_baton (cu, &baton->loclist, target_attr); > prop->data.baton = baton; > prop->kind = PROP_LOCLIST; > @@ -17782,10 +17794,11 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, > else if (attr_form_is_block (target_attr)) > { > baton = XOBNEW (obstack, struct dwarf2_property_baton); > - baton->referenced_type = die_type (target_die, target_cu); > + baton->property_type = die_type (target_die, target_cu); > baton->locexpr.per_cu = cu->per_cu; > baton->locexpr.size = DW_BLOCK (target_attr)->size; > baton->locexpr.data = DW_BLOCK (target_attr)->data; > + baton->locexpr.is_reference = true; > prop->data.baton = baton; > prop->kind = PROP_LOCEXPR; > gdb_assert (prop->data.baton != NULL); > @@ -17806,7 +17819,7 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, > return 0; > > baton = XOBNEW (obstack, struct dwarf2_property_baton); > - baton->referenced_type = read_type_die (target_die->parent, > + baton->property_type = read_type_die (target_die->parent, > target_cu); > baton->offset_info.offset = offset; > baton->offset_info.type = die_type (target_die, target_cu); > @@ -17831,6 +17844,37 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, > return 1; > } > > +/* Find an integer type the same size as the address size given in the > + compilation unit header for PER_CU. UNSIGNED_P controls if the integer > + is unsigned or not. */ > + > +static struct type * > +dwarf2_per_cu_addr_sized_int_type (struct dwarf2_per_cu_data *per_cu, > + bool unsigned_p) > +{ > + struct objfile *objfile = per_cu->dwarf2_per_objfile->objfile; > + int addr_size = dwarf2_per_cu_addr_size (per_cu); > + struct type *int_type; > + > + /* Helper macro to examine the various builtin types. */ > +#define TRY_TYPE(F) \ > + int_type = (unsigned_p \ > + ? objfile_type (objfile)->builtin_unsigned_ ## F \ > + : objfile_type (objfile)->builtin_ ## F); \ > + if (int_type != NULL && TYPE_LENGTH (int_type) == addr_size) \ > + return int_type > + > + TRY_TYPE (char); > + TRY_TYPE (short); > + TRY_TYPE (int); > + TRY_TYPE (long); > + TRY_TYPE (long_long); > + > +#undef TRY_TYPE > + > + gdb_assert_not_reached ("unable to find suitable integer type"); > +} > + > /* Read the DW_AT_type attribute for a sub-range. If this attribute is not > present (which is valid) then compute the default type based on the > compilation units address size. */ > @@ -17853,30 +17897,7 @@ read_subrange_index_type (struct die_info *die, struct dwarf2_cu *cu) > FIXME: muller/2010-05-28: Possible references to object for low bound, > high bound or count are not yet handled by this code. */ > if (TYPE_CODE (index_type) == TYPE_CODE_VOID) > - { > - struct objfile *objfile = cu->per_cu->dwarf2_per_objfile->objfile; > - struct gdbarch *gdbarch = get_objfile_arch (objfile); > - int addr_size = gdbarch_addr_bit (gdbarch) /8; > - struct type *int_type = objfile_type (objfile)->builtin_int; > - > - /* Test "int", "long int", and "long long int" objfile types, > - and select the first one having a size above or equal to the > - architecture address size. */ > - if (int_type && TYPE_LENGTH (int_type) >= addr_size) > - index_type = int_type; > - else > - { > - int_type = objfile_type (objfile)->builtin_long; > - if (int_type && TYPE_LENGTH (int_type) >= addr_size) > - index_type = int_type; > - else > - { > - int_type = objfile_type (objfile)->builtin_long_long; > - if (int_type && TYPE_LENGTH (int_type) >= addr_size) > - index_type = int_type; > - } > - } > - } > + index_type = dwarf2_per_cu_addr_sized_int_type (cu->per_cu, false); > > return index_type; > } > @@ -17945,7 +17966,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) > > attr = dwarf2_attr (die, DW_AT_lower_bound, cu); > if (attr) > - attr_to_dynamic_prop (attr, die, cu, &low); > + attr_to_dynamic_prop (attr, die, cu, &low, base_type); > else if (!low_default_is_valid) > complaint (_("Missing DW_AT_lower_bound " > "- DIE at %s [in module %s]"), > @@ -17954,10 +17975,10 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) > > struct attribute *attr_ub, *attr_count; > attr = attr_ub = dwarf2_attr (die, DW_AT_upper_bound, cu); > - if (!attr_to_dynamic_prop (attr, die, cu, &high)) > + if (!attr_to_dynamic_prop (attr, die, cu, &high, base_type)) > { > attr = attr_count = dwarf2_attr (die, DW_AT_count, cu); > - if (attr_to_dynamic_prop (attr, die, cu, &high)) > + if (attr_to_dynamic_prop (attr, die, cu, &high, base_type)) > { > /* If bounds are constant do the final calculation here. */ > if (low.kind == PROP_CONST && high.kind == PROP_CONST) > @@ -25310,6 +25331,24 @@ dwarf2_per_cu_text_offset (struct dwarf2_per_cu_data *per_cu) > return ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); > } > > +/* Return a type that is a generic pointer type, the size of which matches > + the address size given in the compilation unit header for PER_CU. */ > +static struct type * > +dwarf2_per_cu_addr_type (struct dwarf2_per_cu_data *per_cu) > +{ > + struct objfile *objfile = per_cu->dwarf2_per_objfile->objfile; > + struct type *void_type = objfile_type (objfile)->builtin_void; > + struct type *addr_type = lookup_pointer_type (void_type); > + int addr_size = dwarf2_per_cu_addr_size (per_cu); > + > + if (TYPE_LENGTH (addr_type) == addr_size) > + return addr_type; > + > + addr_type > + = dwarf2_per_cu_addr_sized_int_type (per_cu, TYPE_UNSIGNED (addr_type)); > + return addr_type; > +} > + > /* Return DWARF version number of PER_CU. */ > > short > @@ -25576,7 +25615,9 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) > attr = dwarf2_attr (die, DW_AT_allocated, cu); > if (attr_form_is_block (attr)) > { > - if (attr_to_dynamic_prop (attr, die, cu, &prop)) > + struct type *prop_type > + = dwarf2_per_cu_addr_sized_int_type (cu->per_cu, false); > + if (attr_to_dynamic_prop (attr, die, cu, &prop, prop_type)) > add_dyn_prop (DYN_PROP_ALLOCATED, prop, type); > } > else if (attr != NULL) > @@ -25590,7 +25631,9 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) > attr = dwarf2_attr (die, DW_AT_associated, cu); > if (attr_form_is_block (attr)) > { > - if (attr_to_dynamic_prop (attr, die, cu, &prop)) > + struct type *prop_type > + = dwarf2_per_cu_addr_sized_int_type (cu->per_cu, false); > + if (attr_to_dynamic_prop (attr, die, cu, &prop, prop_type)) > add_dyn_prop (DYN_PROP_ASSOCIATED, prop, type); > } > else if (attr != NULL) > @@ -25602,7 +25645,8 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) > > /* Read DW_AT_data_location and set in type. */ > attr = dwarf2_attr (die, DW_AT_data_location, cu); > - if (attr_to_dynamic_prop (attr, die, cu, &prop)) > + if (attr_to_dynamic_prop (attr, die, cu, &prop, > + dwarf2_per_cu_addr_type (cu->per_cu))) > add_dyn_prop (DYN_PROP_DATA_LOCATION, prop, type); > > if (dwarf2_per_objfile->die_type_hash == NULL)