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 AE1B43858D37 for ; Tue, 14 Mar 2023 14:48:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AE1B43858D37 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 A6C9B1E110; Tue, 14 Mar 2023 10:48:51 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1678805331; bh=kTVh2qs4CRO5yxYVW8k3WvtWd7U5hvuF9wip0oJbTMo=; h=Date:Subject:To:References:From:In-Reply-To:From; b=Si020mmazi8LQIZ2Pd2OPruyHNvjYRJnXMSnRVPufzXFsE+x5GVhDEIrjebT9nLDF kF4mDvCI6fZOI10BSh9hckDdJpLDalUrVg3tqbTo6f2jVA9+vIT3Eh5Algn2FEA+LI MsmsrfPSR2H6QwlXl0xluR/k1rdEpYoGpCfGQOFE= Message-ID: <0f6b19e1-107d-1bfb-38ed-a334739d8c70@simark.ca> Date: Tue, 14 Mar 2023 10:48:51 -0400 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 00/20] Remove objfile_type Content-Language: fr To: Tom Tromey , gdb-patches@sourceware.org References: <20230313-split-objfile-type-allocator-2-v1-0-69ba773ac17b@tromey.com> From: Simon Marchi In-Reply-To: <20230313-split-objfile-type-allocator-2-v1-0-69ba773ac17b@tromey.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.5 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/13/23 18:08, Tom Tromey wrote: > The "split objfile" to-do list has an item for moving objfile_type to > the per-BFD object. However, I noticed recently that the contents of > objfile_type depend solely on the gdbarch. So, there's no reason to > even have this on the objfile at all. In fact, I reasoned, we could > go further and remove it in favor of the per-gdbarch builtin_type. > > However, this doesn't work due to the way type allocation is done. I > have never much liked this part of gdb, so this series first attempts > to clean it up, by introducing a type allocator. This allows for the > removal of some code. During this process, the symbol readers are > changed to prefer allocation of their types on the per-objfile > obstack, which I think is more correct anyway. > > Finally, by the end of the series, objfile_type can be removed. I went quickly through the series, it looks like a nice simplification. The type_allocator stuff seems to remove a lot of duplication, and obviously the removal of objfile_type does too. Given I just gave it a quick look: Reviewed-By: Simon Marchi Simon