From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 90789 invoked by alias); 23 Aug 2018 15:21:41 -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 90310 invoked by uid 89); 23 Aug 2018 15:21:40 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=liberty 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; Thu, 23 Aug 2018 15:21:39 +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 w7NFLWv5009082 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 23 Aug 2018 11:21:37 -0400 Received: by simark.ca (Postfix, from userid 112) id C37801EB3B; Thu, 23 Aug 2018 11:21:32 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id B926F1E4F4; Thu, 23 Aug 2018 11:21:31 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 23 Aug 2018 15:21:00 -0000 From: Simon Marchi To: Xavier Roirand Cc: gdb-patches@sourceware.org, brobecker@adacore.com Subject: Re: [RFA 1/5] Darwin: fix bad loop incrementation In-Reply-To: <35461da20fc0562c31e9f8804ef19372@polymtl.ca> References: <1534932677-9496-1-git-send-email-roirand@adacore.com> <1534932677-9496-2-git-send-email-roirand@adacore.com> <35461da20fc0562c31e9f8804ef19372@polymtl.ca> Message-ID: X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.6 X-IsSubscribed: yes X-SW-Source: 2018-08/txt/msg00566.txt.bz2 On 2018-08-22 09:14, Simon Marchi wrote: > On 2018-08-22 06:11, Xavier Roirand wrote: >> When reading symbols from the vector of oso files on Mac OS X >> Darwin, a previous commit introduce a change in the loop and add >> an increment at each loop iteration whereas this incrementation is >> not needed since the increment or set of the loop control variable >> is already done in the loop. >> >> gdb/ChangeLog: >> >> * machoread.c (macho_symfile_read_all_oso): Remove uneeded >> incrementation. >> >> Change-Id: I3a5a6deb4e9d834ee7d4217a62d90c2ffb7241bc >> --- >> gdb/machoread.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/gdb/machoread.c b/gdb/machoread.c >> index 0cbd209..3040fe7 100644 >> --- a/gdb/machoread.c >> +++ b/gdb/machoread.c >> @@ -615,7 +615,7 @@ macho_symfile_read_all_oso (std::vector >> *oso_vector_ptr, >> std::sort (oso_vector_ptr->begin (), oso_vector_ptr->end (), >> oso_el_compare_name); >> >> - for (ix = 0; ix < oso_vector_ptr->size (); ++ix) >> + for (ix = 0; ix < oso_vector_ptr->size ();) >> { >> int pfx_len; > > I compared this with the original code (before 2cc9b3048b), that LGTM. > > Simon I took the liberty of pushing this patch to master as well as gdb-8.2-branch, since it is a regression since 8.1. Thanks, Simon