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 17DDA3858D33 for ; Wed, 1 Mar 2023 18:44:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 17DDA3858D33 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-180-24.qc.cable.ebox.net [192.222.180.24]) (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 A6EB41E0D3; Wed, 1 Mar 2023 13:44:47 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1677696287; bh=zxApr75Oq6W40LswJONYPGE9Ov9Ju2nxqcklf2RpRc0=; h=Date:Subject:To:References:From:In-Reply-To:From; b=l8ElGWKAwk297STm7xA/lfV+NfjHR3/FtK0pjTVSDlKvs4bqyQysSdgaR0nZmO+tj q/V6jdFAo15dGP3yK6I4st3/NaZLgFOKFcWcMjEowM2WxmCyBAQFr3DPhzNkAa5FIO v5oI8rv+Z2iII9tIB8rN4VCDSCyM0AATXNd8QvNU= Message-ID: Date: Wed, 1 Mar 2023 13:44:47 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH 1/2] Make gdb property batons type-safe To: Tom Tromey , gdb-patches@sourceware.org References: <20230301-submit-baton-stuff-v1-0-567d536a8245@adacore.com> <20230301-submit-baton-stuff-v1-1-567d536a8245@adacore.com> Content-Language: fr From: Simon Marchi In-Reply-To: <20230301-submit-baton-stuff-v1-1-567d536a8245@adacore.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.9 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 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 3/1/23 10:18, Tom Tromey via Gdb-patches wrote: > gdbtypes treats dynamic property batons as 'void *', but in actuality > the only users all use dwarf2_property_baton. This patch changes this > code to be type-safe. If a new type is needed here, it seems like > that too could be done in a type-safe way. I don't mind doing this, because in practice the DWARF reader is the only one to use that data pointer. But just wondering, what would be the "right" way to implement this pattern in a type-safe way, if multiple debug info readers wanted to use that field? Simon