From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 77552 invoked by alias); 11 Feb 2020 09:20:42 -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 77543 invoked by uid 89); 11 Feb 2020 09:20:41 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-23.0 required=5.0 tests=AWL,BAYES_00,FORGED_SPF_HELO,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 spammy=4.8, 1995 X-HELO: EUR04-DB3-obe.outbound.protection.outlook.com Received: from mail-eopbgr60040.outbound.protection.outlook.com (HELO EUR04-DB3-obe.outbound.protection.outlook.com) (40.107.6.40) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 11 Feb 2020 09:20:39 +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=waRtzOBx8olACFwva+IQCu0lsJS2vxudHk/4GwqbKXk=; b=QUfhbh61tDvQ9ZlXjEPcI+2BGPkIyTuNt7IE4PjwAmpmew+MGa2FaXHuKcRgehxG1aVEsHM0WuONZonBf4P676lyRa3QdiQ3gd+mE/Sigk9gsGggvLLezBXYOp5D8aaDBNTSfVgw41Z4ldNFZ9NkFL3P5+z3dp5tK1x3BaBXz1U= Received: from VI1PR0801CA0072.eurprd08.prod.outlook.com (2603:10a6:800:7d::16) by DB6PR0802MB2134.eurprd08.prod.outlook.com (2603:10a6:4:83::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2707.27; Tue, 11 Feb 2020 09:20:36 +0000 Received: from VE1EUR03FT008.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::202) by VI1PR0801CA0072.outlook.office365.com (2603:10a6:800:7d::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2707.21 via Frontend Transport; Tue, 11 Feb 2020 09:20:36 +0000 Authentication-Results: spf=pass (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=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT008.mail.protection.outlook.com (10.152.18.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2665.18 via Frontend Transport; Tue, 11 Feb 2020 09:20:36 +0000 Received: ("Tessian outbound 62d9cfe08e54:v42"); Tue, 11 Feb 2020 09:20:35 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 8944633361fb6596 X-CR-MTA-TID: 64aa7808 Received: from 37db7596cbeb.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 891BBE3A-474B-4EE8-A3B2-29444F94F152.1; Tue, 11 Feb 2020 09:20:30 +0000 Received: from EUR01-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 37db7596cbeb.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 11 Feb 2020 09:20:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T31ltNoOo6p5btg58/VQt29IVPB3OE3D55pm0imFWEGkoyz8rS+jVyXCcTDV8zon1pPx8nfCu01RplQ5VMQptAIoYgpIM5fk7EJd4DNIwkqR4nvPZwb2UzirWGjEeNJ6oiyUMVOlOMYs/2dJ+n17WQjaNh/a7m5rsBKc/X4r50AJwS8OJYMnsprHdrgwoEk+UMsSf+4VU0agL8xCBFsoU7Rgi5BgJpqqtnbQLkA7b38vM3IBBzxps5p1NFtmyHKLXQu1veh8u5gwiQwNp7ZjJhOtJnR2yPvlGXsVNF7GE9rFwk+eto/COhDoRXxIRgp51ZwcuvGufOkWfvwbbMxWLA== 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=waRtzOBx8olACFwva+IQCu0lsJS2vxudHk/4GwqbKXk=; b=CEL0dX5sz2vOJmxtjfBHk8c9R+47W/W0ZvqVUkyobYT+5ztGKSyQWt3F96mliGNao64ltxzUad8WqRpNlqCVbkQrotPLc/Pf89meS4oTl8eYichFqB7OHFs8etjiGaA3dwweEdzeYtDSPsgDMJKhyAkuGWUorTnDHzgE6CWXGaMxeeA6XdLm42CawiTy9C92193QmBNQrYjdqZMuf5Q/3jJ5sh21DkhRrHOn+djZbhp4i+x2lmoay0SEHMx6DA5misCBHZ7NLUrfV0jkjCOVJBF9WWGR2w48LSjxRfwX0Ex7qw7rBUzGO3bVl/oj6CFerXxoizmtA3LiDb7u5duTBg== 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=waRtzOBx8olACFwva+IQCu0lsJS2vxudHk/4GwqbKXk=; b=QUfhbh61tDvQ9ZlXjEPcI+2BGPkIyTuNt7IE4PjwAmpmew+MGa2FaXHuKcRgehxG1aVEsHM0WuONZonBf4P676lyRa3QdiQ3gd+mE/Sigk9gsGggvLLezBXYOp5D8aaDBNTSfVgw41Z4ldNFZ9NkFL3P5+z3dp5tK1x3BaBXz1U= Received: from HE1PR08MB2826.eurprd08.prod.outlook.com (10.170.245.11) by HE1PR08MB2764.eurprd08.prod.outlook.com (10.170.248.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2707.26; Tue, 11 Feb 2020 09:20:29 +0000 Received: from HE1PR08MB2826.eurprd08.prod.outlook.com ([fe80::51da:426:423b:aa21]) by HE1PR08MB2826.eurprd08.prod.outlook.com ([fe80::51da:426:423b:aa21%6]) with mapi id 15.20.2707.030; Tue, 11 Feb 2020 09:20:28 +0000 From: Alan Hayward To: Luis Machado , Richard Earnshaw CC: Christian Biesinger , "gdb-patches\\@sourceware.org" , nd Subject: Re: [PATCH] Add a comment for the ARM_F{0..7}_REGNUM registers Date: Tue, 11 Feb 2020 09:20:00 -0000 Message-ID: <73905855-549A-4BA8-9E6B-F9D567E3E2AC@arm.com> References: <20200210233558.83580-1-cbiesinger@google.com> <3a393049-bc2d-b8be-1b47-20114311d5b3@linaro.org> In-Reply-To: <3a393049-bc2d-b8be-1b47-20114311d5b3@linaro.org> Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com; x-ms-exchange-transport-forked: True x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:619;OLM:619; X-Forefront-Antispam-Report-Untrusted: SFV:NSPM;SFS:(10009020)(4636009)(376002)(136003)(346002)(39860400002)(366004)(396003)(199004)(189003)(4326008)(478600001)(71200400001)(2906002)(36756003)(8936002)(81166006)(966005)(316002)(86362001)(54906003)(110136005)(8676002)(81156014)(64756008)(66446008)(66556008)(76116006)(66946007)(5660300002)(33656002)(6512007)(66476007)(2616005)(6636002)(6506007)(53546011)(26005)(186003)(6486002)(91956017)(101420200001);DIR:OUT;SFP:1101;SCL:1;SRVR:HE1PR08MB2764;H:HE1PR08MB2826.eurprd08.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: JLDNNtm6MF2gslQmkHlZBVpzHbf0EFSNQ+VXQ4IeTMYkYhRy1lbeox3SXx5izBxSjY3kaklUUARmh8g9iFHbtZG6/z+iS82+uDNDYN4NYcm2F9K/RlPdH6SZ/m6nbQkewoSEKnclVYhVqk9h2DgybzNLf8sdeRADdOyZRyQBIzwAePWjYZjZhy+26SWkLMLwnGI171xOTiHlvKNRTcKBrTLZWNs4IRrRjTAAqAEHqkJvGYkMlofG88ek/WADZGD4+8MQW+siu0+5PLQ6S8pEVpZmbeHVvuq8L0rrmRlq3gXEqYFmprX/sKCW+bj46EpW9dtB7HEDNJnkU+Helx2S+aS6jyZLxK1/M8nB48ZgV68AVAq51B5hlFB/dxZ8jrQPwiN3Xd3QBKMIBJu25BVI+asdALH5HQsDwl0nisvRelq+2g+Vbv/YGknUa51SvXtyCLFIjB0Dv6P6VbkulBWsORhaa362uwPHFf1e/hQPibbEa6eelVHEBc7r6wds9qqjevAhBDiIQ8xe1dCy7vngckYhRjGMVNBTHwhIy9JQRvhDdRs1/NNmCvXqn40k7o17b9R4PbgEQoP17GdWLF68BA== x-ms-exchange-antispam-messagedata: LBthKPTBMRcaLVjkQXjbmCnJ1eMae7OJF2L8TSMU9rjfsaRiMzmzp1sHIP70hHQb9Sl983ntsdGqMoCft4CnfAc0u3QxtSbOlzZsajfi+eu89KGBP7HcwrajXgSiB3ufX6pmomTcuvlbLv45Wx+iHA== Content-Type: text/plain; charset="utf-8" Content-ID: <8C50C71850E7EB4FA637F03AE57A2D45@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: VE1EUR03FT008.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: ceb64359-9f48-44a5-abac-08d7aed3a2bd X-IsSubscribed: yes X-SW-Source: 2020-02/txt/msg00372.txt.bz2 DQoNCj4gT24gMTEgRmViIDIwMjAsIGF0IDAwOjMyLCBMdWlzIE1hY2hhZG8g PGx1aXMubWFjaGFkb0BsaW5hcm8ub3JnPiB3cm90ZToNCj4gDQo+IE9uIDIv MTAvMjAgODozNSBQTSwgQ2hyaXN0aWFuIEJpZXNpbmdlciB2aWEgZ2RiLXBh dGNoZXMgd3JvdGU6DQo+PiBUaGVzZSBhcmUgZm9yIHRoZSBvYnNvbGV0ZSBG UEEgYXJjaGl0ZWN0dXJlLg0KPj4gZ2RiL0NoYW5nZUxvZzoNCj4+IDIwMjAt MDItMTAgIENocmlzdGlhbiBCaWVzaW5nZXIgIDxjYmllc2luZ2VyQGdvb2ds ZS5jb20+DQo+PiAJKiBhcmNoL2FybS5oIChlbnVtIGdkYl9yZWdudW0pOiBB ZGQgY29tbWVudCBmb3IgdGhlIEZQMC4uNw0KPj4gCXJlZ2lzdGVycy4NCj4+ IENoYW5nZS1JZDogSTY5MjA2MTYzMThlZTYzNzQ5M2Q0Y2ExMmI5MWZhMmVi Y2QxMDNkNzYNCj4+IC0tLQ0KPj4gIGdkYi9hcmNoL2FybS5oIHwgMSArDQo+ PiAgMSBmaWxlIGNoYW5nZWQsIDEgaW5zZXJ0aW9uKCspDQo+PiBkaWZmIC0t Z2l0IGEvZ2RiL2FyY2gvYXJtLmggYi9nZGIvYXJjaC9hcm0uaA0KPj4gaW5k ZXggMTNmMDMwYWY4Mi4uMmQ5ZTg3ZWI0MiAxMDA2NDQNCj4+IC0tLSBhL2dk Yi9hcmNoL2FybS5oDQo+PiArKysgYi9nZGIvYXJjaC9hcm0uaA0KPj4gQEAg LTMxLDYgKzMxLDcgQEAgZW51bSBnZGJfcmVnbnVtIHsNCj4+ICAgIEFSTV9T UF9SRUdOVU0gPSAxMywJCS8qIENvbnRhaW5zIGFkZHJlc3Mgb2YgdG9wIG9m IHN0YWNrICovDQo+PiAgICBBUk1fTFJfUkVHTlVNID0gMTQsCQkvKiBhZGRy ZXNzIHRvIHJldHVybiB0byBmcm9tIGEgZnVuY3Rpb24gY2FsbCAqLw0KPj4g ICAgQVJNX1BDX1JFR05VTSA9IDE1LAkJLyogQ29udGFpbnMgcHJvZ3JhbSBj b3VudGVyICovDQo+PiArICAvKiBGMC4uRjcgYXJlIHRoZSBmcCByZWdpc3Rl cnMgZm9yIHRoZSAob2Jzb2xldGUpIEZQQSBhcmNoaXRlY3R1cmUuICAqLw0K Pj4gICAgQVJNX0YwX1JFR05VTSA9IDE2LAkJLyogZmlyc3QgZmxvYXRpbmcg cG9pbnQgcmVnaXN0ZXIgKi8NCj4+ICAgIEFSTV9GM19SRUdOVU0gPSAxOSwJ CS8qIGxhc3QgZmxvYXRpbmcgcG9pbnQgYXJndW1lbnQgcmVnaXN0ZXIgKi8N Cj4+ICAgIEFSTV9GN19SRUdOVU0gPSAyMywgCQkvKiBsYXN0IGZsb2F0aW5n IHBvaW50IHJlZ2lzdGVyICovDQo+IA0KPiBUaGlzIGxvb2tzIG9idmlvdXMg ZW5vdWdoLiBjYy1lZCBBbGFuIGluIGNhc2UgaGUgaGFzIGFueSB0aG91Z2h0 cy4NCg0KSeKAmW0gaGFwcHkgZm9yIHRoYXQgdG8gYmUgcHVzaGVkIGFzIGlz LiBCdXQuLi4NCg0KTXkgb25seSBwcm9ibGVtIGhlcmUgaXMgdGhlIHVzZSBv ZiB0aGUgd29yZCDigJxvYnNvbGV0ZeKAnS4gSWYgaXTigJlzIG9ic29sZXRl LCB3aHkgYXJlDQp3ZSBzdGlsbCBzdXBwb3J0aW5nIGl0Pw0KDQpEaWdnaW5n IGludG8gaXQsIEkgZGlkbuKAmXQgcmVhbGlzZSBGUEEgd2FzIHF1aXRlIHRo YXQgb2xkLCBidXQgaXQgZGF0ZXMgYmFjayB0byBhcm91bmQgMTk5NS4NCg0K U29tZSBnb29kIGJhY2tncm91bmQgaW5mb3JtYXRpb24gaGVyZSAocXVlc3Rp b24gd2FzIGFza2VkIG9ubHkgMjIgZGF5cyBhZ28hKQ0KaHR0cHM6Ly9yZXRy b2NvbXB1dGluZy5zdGFja2V4Y2hhbmdlLmNvbS9xdWVzdGlvbnMvMTM0MDAv aGlzdG9yeS1vZi1hcm0tbGludXgtYW5kLWZwYQ0KDQpHQ0Mgc3VwcG9ydCBm b3IgRlBBIHdhcyByZW1vdmVkIGJhY2sgaW4gMjAxMiwgaW4gR0NDIDQuOC4N CkFuZCBHREIgaGFzIGEgaGlzdG9yeSBvZiByZW1vdmluZyBmZWF0dXJlcyBh ZnRlciBHQ0Mgc3VwcG9ydCBoYXMgYmVlbiByZW1vdmVkLg0KDQpJ4oCZZCBz dWdnZXN0IGl04oCZcyB3b3J0aCBzb21lb25lIHJpcHBpbmcgb3V0IEZQQSBz dXBwb3J0IGVudGlyZWx5IGluIGEgZm9sbG93IG9uIHNldCBvZg0KcGF0Y2hl cy4gVGhpcyBsZWF2ZXMgdXMgd2l0aCB2ZnB2MiwgdmZwdjMsIHhzY2FsZS1p d21teHQgYW5kIG5vIGZsb2F0Lg0KDQooY2MtaW5nIFJpY2hhcmQgd2hvIHJl bW92ZWQgdGhlIEZQQSBmcm9tIEdDQywgb24gdGhlIG9mZiBjaGFuY2UgaGUg aGFzIGFueSBvYmplY3Rpb25zKS4NCg0KQWxhbi4= >From gdb-patches-return-164071-listarch-gdb-patches=sources.redhat.com@sourceware.org Tue Feb 11 10:27:03 2020 Return-Path: Delivered-To: listarch-gdb-patches@sources.redhat.com Received: (qmail 99186 invoked by alias); 11 Feb 2020 10:27:03 -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 99177 invoked by uid 89); 11 Feb 2020 10:27:02 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 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=scenes, binary_search X-HELO: mail-wm1-f68.google.com Received: from mail-wm1-f68.google.com (HELO mail-wm1-f68.google.com) (209.85.128.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 11 Feb 2020 10:27:00 +0000 Received: by mail-wm1-f68.google.com with SMTP id p9so2749301wmc.2 for ; Tue, 11 Feb 2020 02:27:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=K10sK2/5DIp5phrxXV2ZZRDrjjve+QBC8Y7qxnd/vws=; b=MWpdZz35rW8vQqFEhIlyAVbguFIoTa0arbbitNuxi/MCItWCexKm3+QfkBZNWobOLw fXnKBydtBenOhyJozXqLjfmQ6jhxelKfd2jms4ljT655gpyDT2GaUqWdwMMDMCM1gTLw laHu0mnp7iOSm63vEN/UK38RfyRpQFYsTSlHjGPH6JHILwR9NyBAqjoBQ/r8oMzU3aYo TXlD52VhTgeKsu2CPdD9ru7Y+5T0j5KXFkPvzqbhPILq9Sf2I1Gp8a1Uel+n0fpFBvKj KPVYW1NSb/iACXsUETY3sS2Kyy4FeIT53yLCfl0dKMMZkj8dKq1KKW8z2SiYAeFpuNX+ ZxHg== Return-Path: Received: from [172.29.6.113] (26.124.146.82.ipv4.evonet.be. [82.146.124.26]) by smtp.gmail.com with ESMTPSA id s22sm3077150wmh.4.2020.02.11.02.26.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Feb 2020 02:26:57 -0800 (PST) Subject: Re: [PATCH 3/8] Change fde table to a vector To: Tom Tromey , gdb-patches@sourceware.org References: <20200208152758.29385-1-tom@tromey.com> <20200208152758.29385-4-tom@tromey.com> From: Luis Machado Message-ID: <5a373a74-9283-5d82-a22d-7a2606a4d3f5@linaro.org> Date: Tue, 11 Feb 2020 10:27:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200208152758.29385-4-tom@tromey.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2020-02/txt/msg00373.txt.bz2 Content-length: 10053 Great cleanup. Just a few comments... On 2/8/20 12:27 PM, Tom Tromey wrote: > This removes struct dwarf2_fde_table, replacing it with a typedef of > std::vector. This simplifies the code somewhat. > > gdb/ChangeLog > 2020-02-08 Tom Tromey > > * dwarf2/frame.c (struct dwarf2_fde_table): Remove. > (dwarf2_fde_table): Typedef for std::vector. > (dwarf2_frame_objfile_data): Remove the deleter. > (dwarf2_frame_find_fde, add_fde, decode_frame_entry_1) > (decode_frame_entry): Update. > (dwarf2_build_frame_info): Use "new". > > Change-Id: Ie31c7413dce2865b76f5f70374ba7a559112ce5e > --- > gdb/ChangeLog | 9 ++++ > gdb/dwarf2/frame.c | 102 ++++++++++++--------------------------------- > 2 files changed, 35 insertions(+), 76 deletions(-) > > diff --git a/gdb/dwarf2/frame.c b/gdb/dwarf2/frame.c > index db8e5cd25f3..6d87e598345 100644 > --- a/gdb/dwarf2/frame.c > +++ b/gdb/dwarf2/frame.c > @@ -129,11 +129,7 @@ struct dwarf2_fde > unsigned char eh_frame_p; > }; > > -struct dwarf2_fde_table > -{ > - int num_entries; > - struct dwarf2_fde **entries; > -}; > +typedef std::vector dwarf2_fde_table; > > /* A minimal decoding of DWARF2 compilation units. We only decode > what's needed to get to the call frame information. */ > @@ -1471,9 +1467,7 @@ dwarf2_frame_cfa (struct frame_info *this_frame) > return get_frame_base (this_frame); > } > > -const struct objfile_key - gdb::noop_deleter> > - dwarf2_frame_objfile_data; > +const struct objfile_key dwarf2_frame_objfile_data; > > > > @@ -1636,7 +1630,7 @@ dwarf2_frame_find_fde (CORE_ADDR *pc, CORE_ADDR *out_offset) > { > for (objfile *objfile : current_program_space->objfiles ()) > { > - struct dwarf2_fde_table *fde_table; > + dwarf2_fde_table *fde_table; > CORE_ADDR offset; > CORE_ADDR seek_pc; > > @@ -1648,20 +1642,20 @@ dwarf2_frame_find_fde (CORE_ADDR *pc, CORE_ADDR *out_offset) > } > gdb_assert (fde_table != NULL); > > - if (fde_table->num_entries == 0) > + if (fde_table->empty ()) > continue; > > gdb_assert (!objfile->section_offsets.empty ()); > offset = objfile->text_section_offset (); > > - gdb_assert (fde_table->num_entries > 0); > - if (*pc < offset + fde_table->entries[0]->initial_location) > + gdb_assert (!fde_table->empty ()); > + if (*pc < offset + (*fde_table)[0]->initial_location) > continue; > > seek_pc = *pc - offset; > - auto end = fde_table->entries + fde_table->num_entries; > - auto it = gdb::binary_search (fde_table->entries, end, seek_pc, bsearch_fde_cmp); > - if (it != end) > + auto it = gdb::binary_search (fde_table->begin (), fde_table->end (), > + seek_pc, bsearch_fde_cmp); > + if (it != fde_table->end ()) > { > *pc = (*it)->initial_location + offset; > if (out_offset) > @@ -1674,16 +1668,13 @@ dwarf2_frame_find_fde (CORE_ADDR *pc, CORE_ADDR *out_offset) > > /* Add a pointer to new FDE to the FDE_TABLE, allocating space for it. */ > static void We don't quite allocate space for it anymore, but we do behind the scenes. The comment seems slightly stale. Plus the sentence reads a bit funny. I'd update this, but i'm fine keeping it too. > -add_fde (struct dwarf2_fde_table *fde_table, struct dwarf2_fde *fde) > +add_fde (dwarf2_fde_table *fde_table, struct dwarf2_fde *fde) > { > if (fde->address_range == 0) > /* Discard useless FDEs. */ > return; > > - fde_table->num_entries += 1; > - fde_table->entries = XRESIZEVEC (struct dwarf2_fde *, fde_table->entries, > - fde_table->num_entries); > - fde_table->entries[fde_table->num_entries - 1] = fde; > + fde_table->push_back (fde); > } > > #define DW64_CIE_ID 0xffffffffffffffffULL > @@ -1702,7 +1693,7 @@ static const gdb_byte *decode_frame_entry (struct comp_unit *unit, > const gdb_byte *start, > int eh_frame_p, > dwarf2_cie_table &cie_table, > - struct dwarf2_fde_table *fde_table, > + dwarf2_fde_table *fde_table, > enum eh_frame_type entry_type); > > /* Decode the next CIE or FDE, entry_type specifies the expected type. > @@ -1712,7 +1703,7 @@ static const gdb_byte * > decode_frame_entry_1 (struct comp_unit *unit, const gdb_byte *start, > int eh_frame_p, > dwarf2_cie_table &cie_table, > - struct dwarf2_fde_table *fde_table, > + dwarf2_fde_table *fde_table, > enum eh_frame_type entry_type) > { > struct gdbarch *gdbarch = get_objfile_arch (unit->objfile); > @@ -2014,7 +2005,7 @@ static const gdb_byte * > decode_frame_entry (struct comp_unit *unit, const gdb_byte *start, > int eh_frame_p, > dwarf2_cie_table &cie_table, > - struct dwarf2_fde_table *fde_table, > + dwarf2_fde_table *fde_table, > enum eh_frame_type entry_type) > { > enum { NONE, ALIGN4, ALIGN8, FAIL } workaround = NONE; > @@ -2128,11 +2119,8 @@ dwarf2_build_frame_info (struct objfile *objfile) > struct comp_unit *unit; > const gdb_byte *frame_ptr; > dwarf2_cie_table cie_table; > - struct dwarf2_fde_table fde_table; > - struct dwarf2_fde_table *fde_table2; > - > - fde_table.num_entries = 0; > - fde_table.entries = NULL; > + dwarf2_fde_table fde_table; > + dwarf2_fde_table *fde_table2; > > /* Build a minimal decoding of the DWARF2 compilation unit. */ > unit = XOBNEW (&objfile->objfile_obstack, comp_unit); > @@ -2181,12 +2169,7 @@ dwarf2_build_frame_info (struct objfile *objfile) > warning (_("skipping .eh_frame info of %s: %s"), > objfile_name (objfile), e.what ()); > > - if (fde_table.num_entries != 0) > - { > - xfree (fde_table.entries); > - fde_table.entries = NULL; > - fde_table.num_entries = 0; > - } > + fde_table.clear (); > /* The cie_table is discarded below. */ > } > > @@ -2200,7 +2183,7 @@ dwarf2_build_frame_info (struct objfile *objfile) > &unit->dwarf_frame_size); > if (unit->dwarf_frame_size) > { > - int num_old_fde_entries = fde_table.num_entries; > + size_t num_old_fde_entries = fde_table.size (); > > try > { > @@ -2215,42 +2198,20 @@ dwarf2_build_frame_info (struct objfile *objfile) > warning (_("skipping .debug_frame info of %s: %s"), > objfile_name (objfile), e.what ()); > > - if (fde_table.num_entries != 0) > - { > - fde_table.num_entries = num_old_fde_entries; > - if (num_old_fde_entries == 0) > - { > - xfree (fde_table.entries); > - fde_table.entries = NULL; > - } > - else > - { > - fde_table.entries > - = XRESIZEVEC (struct dwarf2_fde *, fde_table.entries, > - fde_table.num_entries); > - } > - } > - fde_table.num_entries = num_old_fde_entries; > + fde_table.resize (num_old_fde_entries); Took me a bit to figure out the code above. Quite convoluted in its use of the size variables. But the new code looks sane as far as i can tell. > } > } > > /* Copy fde_table to obstack: it is needed at runtime. */ > - fde_table2 = XOBNEW (&objfile->objfile_obstack, struct dwarf2_fde_table); > + fde_table2 = new dwarf2_fde_table; > The comment mentioning obstack is now obsolete and can be removed. > - if (fde_table.num_entries == 0) > - { > - fde_table2->entries = NULL; > - fde_table2->num_entries = 0; > - } > - else > + if (!fde_table.empty ()) > { > struct dwarf2_fde *fde_prev = NULL; > struct dwarf2_fde *first_non_zero_fde = NULL; > - int i; > > /* Prepare FDE table for lookups. */ > - std::sort (fde_table.entries, fde_table.entries + fde_table.num_entries, > - fde_is_less_than); > + std::sort (fde_table.begin (), fde_table.end (), fde_is_less_than); > > /* Check for leftovers from --gc-sections. The GNU linker sets > the relevant symbols to zero, but doesn't zero the FDE *end* > @@ -2264,10 +2225,8 @@ dwarf2_build_frame_info (struct objfile *objfile) > Start by finding the first FDE with non-zero start. Below > we'll discard all FDEs that start at zero and overlap this > one. */ > - for (i = 0; i < fde_table.num_entries; i++) > + for (struct dwarf2_fde *fde : fde_table) > { > - struct dwarf2_fde *fde = fde_table.entries[i]; > - > if (fde->initial_location != 0) > { > first_non_zero_fde = fde; > @@ -2278,11 +2237,8 @@ dwarf2_build_frame_info (struct objfile *objfile) > /* Since we'll be doing bsearch, squeeze out identical (except > for eh_frame_p) fde entries so bsearch result is predictable. > Also discard leftovers from --gc-sections. */ > - fde_table2->num_entries = 0; > - for (i = 0; i < fde_table.num_entries; i++) > + for (struct dwarf2_fde *fde : fde_table) > { > - struct dwarf2_fde *fde = fde_table.entries[i]; > - > if (fde->initial_location == 0 > && first_non_zero_fde != NULL > && (first_non_zero_fde->initial_location > @@ -2293,16 +2249,10 @@ dwarf2_build_frame_info (struct objfile *objfile) > && fde_prev->initial_location == fde->initial_location) > continue; > > - obstack_grow (&objfile->objfile_obstack, &fde_table.entries[i], > - sizeof (fde_table.entries[0])); > - ++fde_table2->num_entries; > + fde_table2->push_back (fde); > fde_prev = fde; > } > - fde_table2->entries > - = (struct dwarf2_fde **) obstack_finish (&objfile->objfile_obstack); > - > - /* Discard the original fde_table. */ > - xfree (fde_table.entries); > + fde_table2->shrink_to_fit (); > } > > dwarf2_frame_objfile_data.set (objfile, fde_table2); > Otherwise LGTM.