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 531E63858C53 for ; Mon, 17 Apr 2023 18:04:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 531E63858C53 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca Received: from [172.16.0.192] (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) (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 B1F451E0D5; Mon, 17 Apr 2023 14:04:21 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1681754661; bh=BhLdxpFLxui5gJ6XlgNeZVhVGdSaBYqezvWXFIjRn08=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=VKA/k+YojvSfOSv/iQhHCxs6zlOgslcSAw25qZyRj7b8KvX0ypZ37db2GZe0vzrTB A6KF8Iki4VeEKeb0OaTNiEHWUbIBO9biT9TkOydhvPVs5dvgZGSsAeQoPS0SFny3sD zxnWU6S7iIawBjz74EvjD5m3gYW7Ld8TGsvjJNbg= Message-ID: Date: Mon, 17 Apr 2023 14:04:21 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH 2/5] gdb: make set/show args work with $_gdb_setting_str Content-Language: fr To: Tom Tromey , Andrew Burgess via Gdb-patches Cc: Andrew Burgess References: <14b084ae3950c36f8e631404975d3468813ef3fc.1680608960.git.aburgess@redhat.com> <87ttxe31of.fsf@tromey.com> From: Simon Marchi In-Reply-To: <87ttxe31of.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.7 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,T_SCC_BODY_TEXT_LINE 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 4/17/23 12:37, Tom Tromey wrote: >>>>>> "Andrew" == Andrew Burgess via Gdb-patches writes: > > Andrew> Luckily, the fix is pretty easy, set/show variables have an > Andrew> alternative API which requires we provide some getter and setter > Andrew> functions. With this done the scratch variable can be removed and the > Andrew> value returned will now always reflect the current inferior. > > Wow, I didn't realize this had been implemented. > > I think all options requiring the "two phase" approach should be > rewritten to this form, and the old form just removed entirely. > > This is related to https://sourceware.org/bugzilla/show_bug.cgi?id=12188 > but not exactly -- I guess we'd have to add a second getter API to > convert "auto" parameters to their "current" value. We implemented this downstream in ROCgdb, I'm currently working on upstreaming it. I'm going through all settings, trying to see which ones could use it. https://review.lttng.org/c/binutils-gdb/+/9764 Simon