From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 0C64E3858012 for ; Sun, 29 Aug 2021 21:11:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0C64E3858012 Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (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 2CDF82002E; Sun, 29 Aug 2021 21:11:34 +0000 (UTC) Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (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 imap1.suse-dmz.suse.de (Postfix) with ESMTPS id 122201371C; Sun, 29 Aug 2021 21:11:34 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap1.suse-dmz.suse.de with ESMTPSA id YS9AAwb4K2FQPQAAGKfGzw (envelope-from ); Sun, 29 Aug 2021 21:11:34 +0000 Subject: Re: [PATCH][gdb/testsuite] Support .debug_aranges in dwarf assembly To: Simon Marchi , Tom Tromey , Tom de Vries via Gdb-patches References: <20210826115625.GA22715@delia> <87eeafovsa.fsf@tromey.com> <40b7d95e-cc02-38c7-5406-0fc83a2a1b28@polymtl.ca> <3ece042f-2e05-66dd-2f18-0ba2555a76dd@polymtl.ca> <27d5091f-19e7-1f7f-8f0c-06e841c29d79@polymtl.ca> From: Tom de Vries Message-ID: Date: Sun, 29 Aug 2021 23:11:33 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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, 29 Aug 2021 21:11:46 -0000 On 8/29/21 9:54 PM, Simon Marchi wrote: >> OK, I've integrated the subst bit (and made it conditional, that was >> still missing). Also added the subst part for the default arguments, >> and added a proper log message. Any further comments? > > LGTM. > >> [ FWIW, a bit of bike-shedding. I could imagine a pattern where you >> pair a proc and _ like this: >> ... >> proc arange_ { options start len } { >> ... >> } >> proc arange { start len } { >> arange_ {} start len >> } >> ... >> to be able to do: >> ... >> arange $start $len >> ... >> and: >> ... >> arange_ { comment "bla" } $start $len >> ... >> which would be slightly less annoying that having to specify empty >> options. ] > > I don't mind either way. Even nicer would be to allow both: > > arange $start $len > arange { comment "bla" } $start $len > > But that would probably require going back to using args, Yes, actually that is my much preferred option, and roughly what I started out with, but apparently it's not good tcl style. > which breaks > the purpose of what you're doing here. > > Just to understand how we can do this in a systematic and predictable > way, would you do it just for "arange" or would you do it for all procs > of this style, like "cu"? I'd do it for all such procs. > In some cases (like cu), the case of having > options is more common than the case of not having options. So would > you still have "cu" without options and "cu_" with options? Yes, cu_ or cu_1 or cu_o (where o stands for with options) or some such. I think this should either be done everywhere (well, in lib/dwarf.exp at least) or not at all. I suspect it's one of those tricks that is easy to pick up if you see it everywhere, but if it's used in just one location it's easy to overlook or misunderstand. Thanks, - Tom