From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 7A24E3835567 for ; Sat, 17 Sep 2022 09:59:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7A24E3835567 Received: from [10.9.7.166] (vpn-konference.ms.mff.cuni.cz [195.113.20.101]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id B4B3D1E0D3; Sat, 17 Sep 2022 05:59:42 -0400 (EDT) Message-ID: <8038e1cd-b065-4cfd-d5d9-af6d957c92fc@simark.ca> Date: Sat, 17 Sep 2022 05:59:40 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.0 Subject: Re: [PATCH][gdb/symtab] Add all_comp_units_cu/tu Content-Language: fr To: Tom de Vries , gdb-patches@sourceware.org References: <20220916124250.GA19747@delia> From: Simon Marchi In-Reply-To: <20220916124250.GA19747@delia> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Sep 2022 09:59:44 -0000 On 9/16/22 08:42, Tom de Vries via Gdb-patches wrote: > Hi, > > Add all_comp_units_cu and all_comp_units_tu arrayviews on all_comp_units, > which allows us to: > - easily get the number of CUs or TUs in all_comp_units, and > - easily access the nth CU or TU. I think it's a good idea, but I would suggest reworking the naming a bit. I find it unclear to comp_units_cu and comp_units_tu, given that "cu" means comp_units. I would suggest renaming all_comp_units to all_units (since it contains units of different kinds), and then you can have all_comp_units and all_type_units for the array views. Simon