From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 86101 invoked by alias); 10 Jan 2019 18:10:43 -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 86092 invoked by uid 89); 10 Jan 2019 18:10:42 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1418 X-HELO: gateway23.websitewelcome.com Received: from gateway23.websitewelcome.com (HELO gateway23.websitewelcome.com) (192.185.50.164) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 10 Jan 2019 18:10:41 +0000 Received: from cm14.websitewelcome.com (cm14.websitewelcome.com [100.42.49.7]) by gateway23.websitewelcome.com (Postfix) with ESMTP id A96371A4EF for ; Thu, 10 Jan 2019 12:10:39 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id hemtgBxYr2qH7hemtgqWqS; Thu, 10 Jan 2019 12:10:39 -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=F4jkJhKhvAM3daJ+2NpMY2FcqZSH/DMmCeYvqF0GLZk=; b=TUV0EVeTJTW4t0d5W2cknO/+h5 24JBTRMQcxC/pMf9pnyPtIHAxypU5STij7uckZFcUWInatvTPzYfT0YPGV4sdrR6PYed6Qgbre5vQ fz2jR0zA+S/HS7l9H1ebyddme; Received: from 75-166-72-210.hlrn.qwest.net ([75.166.72.210]:46774 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1ghemt-000YHa-CT; Thu, 10 Jan 2019 12:10:39 -0600 From: Tom Tromey To: Pedro Alves Cc: Tom Tromey , Simon Marchi , gdb-patches@sourceware.org Subject: Re: [PATCH 00/12] Remove some ALL_* iteration macros References: <20181125165439.13773-1-tom@tromey.com> <4406ff6a-975d-0db7-747c-27c7edda8bdb@simark.ca> <87y381v2iu.fsf@tromey.com> <87h8el1raa.fsf@tromey.com> <1565370d-7094-ab55-26ea-b4efa92ac139@redhat.com> Date: Thu, 10 Jan 2019 18:10:00 -0000 In-Reply-To: <1565370d-7094-ab55-26ea-b4efa92ac139@redhat.com> (Pedro Alves's message of "Thu, 10 Jan 2019 16:45:46 +0000") Message-ID: <87imywpen5.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-01/txt/msg00223.txt.bz2 >>>>> "Pedro" == Pedro Alves writes: Pedro> Yeah. Though, I think that if we took this route, then Pedro> all_compunits () Pedro> could still return just a compunit pointer, not two things: Pedro> compunit_symtab *all_compunits () Pedro> because you can always get the objfile pointer from compunit_symtab::objfile. In the long run I still hope to get rid of compunit_symtab::objfile. Though I suppose this could just be added to the future to-do list. [...] Pedro> in the threads/inferiors iterators I named the range types xxx_range Pedro> and then added methods to return the range instead of calling Pedro> the ctor directly. In this case, it'd be the equivalent of naming Pedro> the class above Pedro> class objfile_compunits_range : public next_adapter Pedro> { Pedro> and then adding a method to objfile::compunits() method like: Pedro> objfile_compunits_range compunits () Pedro> { return objfile_compunits_range (this); } [...] Pedro> OOC, did you consider following that, and decided again? Pedro> No need to redo the series or anything, I'm just curious, Pedro> since I would have taken a different choice. I didn't even think of it. I will add this to my to-do list, it does look better. Also maybe I next_adapter should be renamed to something better, at least having the word "range" in it? Tom