From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 49875 invoked by alias); 22 Feb 2020 00:38:48 -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 49867 invoked by uid 89); 22 Feb 2020 00:38:47 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-7.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1102, states X-HELO: gateway31.websitewelcome.com Received: from gateway31.websitewelcome.com (HELO gateway31.websitewelcome.com) (192.185.143.38) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 22 Feb 2020 00:38:46 +0000 Received: from cm13.websitewelcome.com (cm13.websitewelcome.com [100.42.49.6]) by gateway31.websitewelcome.com (Postfix) with ESMTP id 85BD623D93 for ; Fri, 21 Feb 2020 18:38:45 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id 5IofjbmddRP4z5Iofj1Ybn; Fri, 21 Feb 2020 18:38:45 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=xz7Bq2NXKCMc27IoG0uO3d6JheGMbuFVbHnce9uzYeY=; b=Aez25Ing+3NaVhRL83cHd3yke1 t0xyUW2y3F60miGwbF2nIqEqL2zNNWngDv2F391JH9GjFWfx8Nsczss+1aIOLob/cBaxqOjzBumDg wwfKax5iFFyWx2Q7WDuJqCSWL; Received: from 75-166-123-50.hlrn.qwest.net ([75.166.123.50]:53924 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1j5Iof-001tV1-9i; Fri, 21 Feb 2020 17:38:45 -0700 From: Tom Tromey To: Simon Marchi Cc: Luis Machado , Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH 08/14] Remove symtab links from dwarf2_psymtab and dwarf2_per_cu_quick_data References: <20200215165444.32653-1-tom@tromey.com> <20200215165444.32653-9-tom@tromey.com> <6767060e-cc61-1180-de10-df5652d606bb@linaro.org> <2314c5d2-55f7-1ab3-b92c-862b945cc68d@simark.ca> Date: Sat, 22 Feb 2020 00:38:00 -0000 In-Reply-To: <2314c5d2-55f7-1ab3-b92c-862b945cc68d@simark.ca> (Simon Marchi's message of "Tue, 18 Feb 2020 23:47:15 -0500") Message-ID: <87mu9b78x7.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2020-02/txt/msg00873.txt.bz2 >>>>> "Simon" == Simon Marchi writes: Simon> I was going to say the same thing, a getter on dwarf2_unshareable Simon> would be nice. Since this is a new data type, we might as well Simon> design it right from the start. I ended up with a method on dwarf2_per_objfile. >>> + std::vector> symtabs; Simon> Having pointers in an optional gives us three states: Simon> 1- not instantiated Simon> 2- instantiated but NULL Simon> 3- instantiated and not NULL Simon> Do we actually need the distinction between 1 and 2 here? If not, I think the optional Simon> doesn't bring much and just makes the code more complicated. Yes, it's weird; but I did this to preserve the status quo. It's possible that this is not needed but figuring that out seemed like a separate effort. It's possible that this can only happen for include psymtabs. I plan to make a separate subclass for these, which would clarify this somewhat. But I'd rather get this series in first. Tom