From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 128425 invoked by alias); 10 Jul 2019 20:38:55 -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 128417 invoked by uid 89); 10 Jul 2019 20:38:55 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-8.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_1,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=UD:p.m, p.m 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; Wed, 10 Jul 2019 20:38:54 +0000 Received: from [172.16.0.120] (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 6C86C1E472; Wed, 10 Jul 2019 16:38:52 -0400 (EDT) Subject: Re: [PATCH 7/9] Change solib-aix.c to use type-safe registry To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20190710153947.25721-1-tromey@adacore.com> <20190710153947.25721-8-tromey@adacore.com> <87pnmhd3yi.fsf@tromey.com> From: Simon Marchi Message-ID: <5e0108b9-3677-ba71-73e2-4907aae53807@simark.ca> Date: Wed, 10 Jul 2019 20:38:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <87pnmhd3yi.fsf@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-07/txt/msg00283.txt.bz2 On 2019-07-10 4:33 p.m., Tom Tromey wrote: >>>>>> "Simon" == Simon Marchi writes: > >>> +typedef gdb::optional> library_list_type; > > Simon> Hmm, I find that hiding the gdb::optional behind a typedef can be a bit > Simon> confusing. It's easy to forget that it's an optional if it's not "in your > Simon> face". I think it would help to be explicit and spell out gdb::optional > Simon> where needed. > > Makes sense, I've removed the typedef. > > I made the other changes you mentioned, except... > >>> - for (ix = 1; VEC_iterate (lm_info_aix_p, library_list, ix, info); ix++) >>> + for (ix = 1; ix < library_list->size (); ix++) > > Simon> This could be: > > Simon> for (lm_info_aix &info : *library_list) > > This isn't quite the same, because the current loop starts at index 1, > not 0. So, I didn't make this change. Ah good point, you are right, sorry about that!