From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 549CA38A8845 for ; Fri, 23 Jul 2021 21:16:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 549CA38A8845 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 16NLFj6s006363 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 23 Jul 2021 17:15:50 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 16NLFj6s006363 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 C08851E4A3; Fri, 23 Jul 2021 17:15:44 -0400 (EDT) Subject: Re: [PATCH 15/16] gdb: make cmd_list_element var an optional union To: Lancelot SIX Cc: gdb-patches@sourceware.org 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> <20210720230335.dcpfxbol2uwjre3b@Plymouth> <20210723204613.ud6kkhnt46dz4bq3@ubuntu.lan> From: Simon Marchi Message-ID: Date: Fri, 23 Jul 2021 17:15:44 -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: <20210723204613.ud6kkhnt46dz4bq3@ubuntu.lan> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Fri, 23 Jul 2021 21:15:45 +0000 X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, 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: Fri, 23 Jul 2021 21:16:53 -0000 On 2021-07-23 4:46 p.m., Lancelot SIX wrote: > Hi, > > I plan on spending some more time on it this week end hopefully. > > If you do not mind waiting a bit for my patch to be finalized, and want > to go with my approach, there is indeed no point merging yours now. The > main thing I try to avoid is having both of us working at the same time > on different solutions of the same problem. Your approach has the > advantage of being almost ready, I can wait for it to be stabilized > before I adapt my work on top on it. If you are fine waiting for my > approach, I’ll proceed! > > My plan is to: > > - Improve slightly > https://sourceware.org/pipermail/gdb-patches/2021-July/180991.html > (use gdb::Requires instead of static assert, include the python > binding I forgot because I did not build it, add some selftests of > the runtime checks introduced by the getters and getters, and ensure > the documentation is adequate). > - Adapt your patch using std::string on top on my architecture > (https://sourceware.org/pipermail/gdb-patches/2021-July/180921.html). > - Add a new patch that allows the use of setter / getter (based on what > was is drafted in > https://sourceware.org/pipermail/gdb-patches/2021-July/181037.html). > As a side note, the storage of user provided getter / setter functions > is done using a unions (void* is not an appropriate for that). It is > possible to use the same approach to create getters and setters around > the union of pointers you provide in your patch (but this would require > some work, obviously). > > Does that makes sense? Yeah, the only thing I would ask: could you verify whether the approach of allowing getters / setters that you envision can work with my work-in-progress patch here? Or if my patch can be changed to work with your approach. https://review.lttng.org/c/binutils-gdb/+/5831 The reason for all this churn and refactor is to fix some bugs (as described in the commit log of the patch), so I want to make sure there's a way forward. Also, could you provide a git branch with your latest patch? It will be easier than figuring out on what to apply it. Simon