From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id 2E6A23817F53 for ; Sun, 18 Sep 2022 08:13:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2E6A23817F53 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 6BEE11F98B; Sun, 18 Sep 2022 08:13:07 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 570AA13A6B; Sun, 18 Sep 2022 08:13:07 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id BijOExPTJmPtLwAAMHmgww (envelope-from ); Sun, 18 Sep 2022 08:13:07 +0000 Message-ID: Date: Sun, 18 Sep 2022 10:13:06 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH][gdb/symtab] Add all_comp_units_cu/tu Content-Language: en-US To: Simon Marchi , gdb-patches@sourceware.org References: <20220916124250.GA19747@delia> <8038e1cd-b065-4cfd-d5d9-af6d957c92fc@simark.ca> From: Tom de Vries In-Reply-To: <8038e1cd-b065-4cfd-d5d9-af6d957c92fc@simark.ca> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, 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: Sun, 18 Sep 2022 08:13:09 -0000 On 9/17/22 11:59, Simon Marchi wrote: > 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. I've done that now. I initially had two patches that I merged and tested, but I reverted back to two patches because I think it'll be easier to review. Sumitted here: - https://sourceware.org/pipermail/gdb-patches/2022-September/191908.html - https://sourceware.org/pipermail/gdb-patches/2022-September/191907.html Thanks, - Tom