From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id wDF7CVfY9WCRQgAAWB0awg (envelope-from ) for ; Mon, 19 Jul 2021 15:53:59 -0400 Received: by simark.ca (Postfix, from userid 112) id 195D51EDF2; Mon, 19 Jul 2021 15:53:59 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 627E61E54D for ; Mon, 19 Jul 2021 15:53:58 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DE4453889C36 for ; Mon, 19 Jul 2021 19:53:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DE4453889C36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1626724437; bh=cJoGx1EJ7FU54AHumEaR8Hb8Ijk3+Tmsj5l4lm153pg=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=k9PvnumvWvV4hYy4T3Fa6gSZl1nnv4NOLAZhRlXsDG2Z2t4HUSrSnTge4v2JKN5wS kl6+sxqMCSXLtpwDHNFA0qMkvXgOgX5rzys83/UTa7NIUWl7Z3XG4w6Emj8TJAt65d dqNSo8D1j3Hqs5OUuPK+xs0PKIaSNs/NdfeUw1fE= Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id D1032386100B for ; Mon, 19 Jul 2021 19:53:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D1032386100B Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 16JJqVtb020569 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 19 Jul 2021 15:52:36 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 16JJqVtb020569 Received: from [10.0.0.11] (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 0EA2C1E54D; Mon, 19 Jul 2021 15:52:30 -0400 (EDT) Subject: Re: [PATCH 15/16] gdb: make cmd_list_element var an optional union To: Lancelot SIX References: <20210714045520.1623120-1-simon.marchi@polymtl.ca> <20210714045520.1623120-16-simon.marchi@polymtl.ca> <20210714120851.3pfew5pgcdp6ezn6@ubuntu.lan> <20210714171238.vzccwpurh2izbkps@ubuntu.lan> <20210714232112.wsn7pits6uuz3nf5@ubuntu.lan> Message-ID: Date: Mon, 19 Jul 2021 15:52:30 -0400 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-Poly-FromMTA: (simark.ca [158.69.221.121]) at Mon, 19 Jul 2021 19:52:31 +0000 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: , From: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" > I took a quick look, and that seems reasonable to me. I don't think it > will conflict (in design) with my upcoming patch. My upcoming patch > makes it so that some settings don't use the storage that is in > cmd_list_element at all, but instead provide some getter/setter > callback. This is to fix display of settings where the "source of > truth" is not cmd_list_element::var. > > With my patch, the code at various places becomes, conceptually: > > if (cmd_list_element::var is set) > use cmd_list_element::var > else > use the getter/setter > > I think it would be nice to make the first case (using > cmd_list_element::var for storage) just a specific case of using the > getter/setter. That is, when we create a setting that uses > cmd_list_element::var for storage, we install a getter and a setter than > get and set the value in cmd_list_element::var. But I haven't gotten > there yet. You'll probably have some good ideas for achieving this :). > > But before posting that patch, I'd like to decide how the current patch > series will end up, because that will very much affect how the next > patch will look like. I realize I wasn't accurate here. The storage isn't actually in cmd_list_element::var, cmd_list_element::var only contains pointers to the storage. But the rest still stands. Simon