From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21047 invoked by alias); 14 Mar 2018 21:20:38 -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 21034 invoked by uid 89); 14 Mar 2018 21:20:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 14 Mar 2018 21:20:36 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id w2ELKUDf016722 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 14 Mar 2018 17:20:34 -0400 Received: by simark.ca (Postfix, from userid 112) id 2787C1E7A3; Wed, 14 Mar 2018 17:20:30 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id C33771E4B0; Wed, 14 Mar 2018 17:20:29 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 14 Mar 2018 21:20:00 -0000 From: Simon Marchi To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [RFA] Remove make_cleanup_free_section_addr_info In-Reply-To: <20180313165529.23237-1-tom@tromey.com> References: <20180313165529.23237-1-tom@tromey.com> Message-ID: X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.4 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Wed, 14 Mar 2018 21:20:30 +0000 X-IsSubscribed: yes X-SW-Source: 2018-03/txt/msg00289.txt.bz2 On 2018-03-13 12:55, Tom Tromey wrote: > This removes make_cleanup_free_section_addr_info, instead introducing > a new section_addr_info_up type and changing all the uses. While > doing this, I noticed that addrs_section_sort could be changed to > return a std::vector, allowing the removal of even more cleanups. > > Regression tested by the buildbot. Hi Tom, Did you consider changing the section_addr_info struct to use entirely by an std::vector? Functions that return a section_addr_info could return a vector directly (by value? is that how we say it?), so we shouldn't need any custom unique pointer. Then, other_sections::name can be made into a string, removing the need to free it by hand. Simon