From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 118438 invoked by alias); 18 Jul 2018 14:36:08 -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 118408 invoked by uid 89); 18 Jul 2018 14:36:07 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3 autolearn=ham version=3.3.2 spammy= X-HELO: sesbmg23.ericsson.net Received: from sesbmg23.ericsson.net (HELO sesbmg23.ericsson.net) (193.180.251.37) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 18 Jul 2018 14:36:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; d=ericsson.com; s=mailgw201801; c=relaxed/simple; q=dns/txt; i=@ericsson.com; t=1531924563; h=From:Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=6B3agwjET4Hxr60YOgmFugOV9uReQRIxYmARfP7Z484=; b=HhUyVJZcbyyTp0gSQThhdPe7w4Li8DzZgYpLl6KMhUDOO/2Byh7P73LC3Hed2ZZe CRZtoxod7+k2f9xIKQAmUXDdcLGG0J2hDSnyhjwk0hwGSBBaBHufD1Ng7+JhH/Ad ZoSLcoe7X/qMkaGFIGupxvSHl+2hCtoGRzAfDVH56po=; Received: from ESESBMB503.ericsson.se (Unknown_Domain [153.88.183.116]) by sesbmg23.ericsson.net (Symantec Mail Security) with SMTP id F7.9F.25360.3505F4B5; Wed, 18 Jul 2018 16:36:03 +0200 (CEST) Received: from ESESBMR503.ericsson.se (153.88.183.135) by ESESBMB503.ericsson.se (153.88.183.186) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Wed, 18 Jul 2018 16:36:03 +0200 Received: from ESESBMB505.ericsson.se (153.88.183.172) by ESESBMR503.ericsson.se (153.88.183.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Wed, 18 Jul 2018 16:36:03 +0200 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (153.88.183.157) by ESESBMB505.ericsson.se (153.88.183.172) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3 via Frontend Transport; Wed, 18 Jul 2018 16:36:03 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9VMmZQGsCoP9L+ex1gunqejnZH/d/MhK1789S7Q8nbk=; b=RAKmT/csgpwq21ASOeAI9vkZWp9h4MdtqwIHD/Ja8LjbRMdwBRCkChB/jmXRBeUGqPWQHJu7969bsMXZwHrB6RKv+UVPme1Dlq59FnPcy9/avj7169dzTBhfkrXsDNVdYjJxM8kH9gnE4lsNtwL+Jrd8pD1snTqUgdro6JL1lsU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=simon.marchi@ericsson.com; Received: from [10.0.0.110] (192.222.164.54) by DM6PR15MB2395.namprd15.prod.outlook.com (2603:10b6:5:8d::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.952.17; Wed, 18 Jul 2018 14:36:00 +0000 Subject: Re: [RFA 14/15] Make psymtab_storage::free_psymtabs private To: Tom Tromey , References: <20180510222357.27332-1-tom@tromey.com> <20180510222357.27332-15-tom@tromey.com> From: Simon Marchi Message-ID: Date: Wed, 18 Jul 2018 14:36:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180510222357.27332-15-tom@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-Path: simon.marchi@ericsson.com Received-SPF: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts) X-IsSubscribed: yes X-SW-Source: 2018-07/txt/msg00555.txt.bz2 On 2018-05-10 06:23 PM, Tom Tromey wrote: > This adds a new psymtab allocation method to psymtab_storage and > changes the free_psymtabs member to be private. While not strictly > necessary, this seems like a decent cleanup, and also makes it simpler > to move psymtabs off of obstacks entirely, should that prove > desirable. > > 2018-05-10 Tom Tromey > > * psymtab.h (psymtab_storage::allocate_psymtab): New method. > : Now private. > * psymtab.c (psymtab_storage::allocate_psymtab): Implement. > (allocate_psymtab): Use new method. > --- > gdb/ChangeLog | 7 +++++++ > gdb/psymtab.c | 44 +++++++++++++++++++++++++------------------- > gdb/psymtab.h | 14 ++++++++++---- > 3 files changed, 42 insertions(+), 23 deletions(-) > > diff --git a/gdb/psymtab.c b/gdb/psymtab.c > index d121eace54..f109e9f1ee 100644 > --- a/gdb/psymtab.c > +++ b/gdb/psymtab.c > @@ -78,6 +78,29 @@ psymtab_storage::~psymtab_storage () > psymbol_bcache_free (psymbol_cache); > } > > +/* See psymtab.h. */ > + > +struct partial_symtab * > +psymtab_storage::allocate_psymtab () > +{ > + struct partial_symtab *psymtab; > + > + if (free_psymtabs) != nullptr Otherwise, LGTM. Simon