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 E9C733858D28 for ; Sun, 26 Feb 2023 08:25:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E9C733858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de 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 B61021F37F; Sun, 26 Feb 2023 08:25:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1677399921; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=r4crTGtN8BOVC9UUUXp1Bldl8TVhgmalIWM0A6w0BwA=; b=g9XmqSXP4t9Qz32oRH22iBDJmj9EQ21xsO7c1F3h9suYELMlgAiB7+CpFsPlbWoGEJykJR fp4e72b47SdhOlxWKl4nmEtnJBxPbjl4+GD6tGth2xng9tMAWOnQZm97mpeCGKG0iMXd44 v/ZY0mtOHMvXVw3BQn7gh3OLd8SN72k= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1677399921; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=r4crTGtN8BOVC9UUUXp1Bldl8TVhgmalIWM0A6w0BwA=; b=pYlPF5qXCnq0NUDi96YEmgTaaVydT7/H/JTEBtK907Q3Rwhch428K4Q/J0ArGjy/MFTyu4 G9/ZTIFxCyMzOQBA== 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 9DF9913480; Sun, 26 Feb 2023 08:25:21 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 52JVJXEX+2NeBQAAMHmgww (envelope-from ); Sun, 26 Feb 2023 08:25:21 +0000 Message-ID: <3217bd87-4294-18b2-5c7d-5058526f3c72@suse.de> Date: Sun, 26 Feb 2023 09:25:24 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH] [gdb/symtab] Add set/show always-read-ctf on/off Content-Language: en-US To: Tom Tromey Cc: Tom de Vries via Gdb-patches References: <20230224123522.21756-1-tdevries@suse.de> <87r0uehn8d.fsf@tromey.com> <875ybp2aas.fsf@tromey.com> From: Tom de Vries In-Reply-To: <875ybp2aas.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8; format=flowed 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.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2/25/23 13:34, Tom Tromey wrote: > Tom> Hmm, I'm starting to wonder now, perhaps a way to cover both scenarios > Tom> (the one described above and the non-overlapping dwarf+ctf one I'm > Tom> trying to fix) is to check where the dwarf came from: > Tom> - if the dwarf resides in the same object file as the ctf, read both > Tom> - if the dwarf doesn't come from the same object file (so, it comes from > Tom> a debug info package or debug info server), skip the ctf > > Tom> I suppose that'll work, but even so I still think it makes sense to > Tom> make it configurable. For instance, the added test-case in > Tom> combination with target board cc-with-gnu-debuglink will need > Tom> convincing to read both ctf an dwarf, even if the dwarf has been split > Tom> off. > > Tom> WDYT? > > I think your original approach is fine as well, and I'd hate to make it > more complicated for you. > OK, then let's go with that. As for syntax, I went now first for the simplest approach, an on/off setting: ... set always-read-ctf ... which itself for instance could be reformulated as read-ctf-always or ctf-read-always, I'm not sure if there's a preferred scheme for things like that. Furthermore, I wonder, if we want to keep the possibility open of adding additional ways to handle this in the future, should we go instead with something like: ... set read-ctf ... or: ... set ctf-read ... or: ... set ctf-read ... such that we could add the strategy proposed above as say no-external-dwarf2. Or am I unnecessarily complicating things? Thanks, - Tom