From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 53723 invoked by alias); 2 May 2017 17:25:39 -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 53708 invoked by uid 89); 2 May 2017 17:25:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_1,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=ham version=3.3.2 spammy= X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 02 May 2017 17:25:36 +0000 Received: by simark.ca (Postfix, from userid 33) id C8E931E4A5; Tue, 2 May 2017 13:25:36 -0400 (EDT) To: Pedro Alves Subject: Re: [PATCH v3] Use std::vector in lm_info_target X-PHP-Originating-Script: 33:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 02 May 2017 17:25:00 -0000 From: Simon Marchi Cc: gdb-patches@sourceware.org In-Reply-To: <7652620c-1f87-8fe2-ee9a-50952166197e@redhat.com> References: <614e9e92-fa8b-35f3-c15c-9dde043962e8@redhat.com> <20170430003455.13878-1-simon.marchi@polymtl.ca> <7652620c-1f87-8fe2-ee9a-50952166197e@redhat.com> Message-ID: <378fb30427fbc719605c1761450d6a51@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.2.5 X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg00020.txt.bz2 On 2017-05-02 12:12, Pedro Alves wrote: > On 04/30/2017 01:34 AM, Simon Marchi wrote: > >> @@ -372,10 +364,7 @@ Could not relocate shared library \"%s\": wrong >> number of ALLOC sections"), >> { >> int bases_index = 0; >> int found_range = 0; >> - CORE_ADDR *section_bases; >> - >> - section_bases = VEC_address (CORE_ADDR, >> - li->section_bases); >> + CORE_ADDR *section_bases = li->section_bases.data (); > > I think this variable could be eliminated, and replaced by further > below doing: > > - low = section_bases[i]; > + low = li->section_bases[i]; > > in a couple places. > > Otherwise LGTM. Indeed, I changed it. Thanks.