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 5B7123858010 for ; Wed, 21 Sep 2022 15:01:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5B7123858010 Received: from [10.0.0.11] (unknown [217.28.27.60]) (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 1282B1E07B; Wed, 21 Sep 2022 11:01:41 -0400 (EDT) Message-ID: <48caddaf-2fe5-0f7a-3016-1891933ffe02@simark.ca> Date: Wed, 21 Sep 2022 11:01:41 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH 2/4] gdb: remove TYPE_TARGET_TYPE Content-Language: en-US To: Lancelot SIX , Simon Marchi Cc: gdb-patches@sourceware.org References: <20220916150836.527213-1-simon.marchi@efficios.com> <20220916150836.527213-2-simon.marchi@efficios.com> <20220921143750.pkzms5alxkvhtcwf@ubuntu.lan> From: Simon Marchi In-Reply-To: <20220921143750.pkzms5alxkvhtcwf@ubuntu.lan> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.2 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 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: Wed, 21 Sep 2022 15:02:24 -0000 On 2022-09-21 10:37, Lancelot SIX via Gdb-patches wrote: > Hi, > > When applying it locally, I have: > > Applying: gdb: remove TYPE_TARGET_TYPE > .git/rebase-apply/patch:4243: space before tab in indent. > current_type = current_type->target_type (); > warning: 1 line adds whitespace errors. Not my fault, they were already there! Fixed anyhow, thanks for pointing it out. > On Fri, Sep 16, 2022 at 11:08:34AM -0400, Simon Marchi via Gdb-patches wrote: >> From: Simon Marchi >> >> Remove the macro, replace all uses by calls to type::length. > ^ > I think you meant type::target_type here. Indeed, thanks. > Also after applying the patch, git grep TYPE_TARGET_TYPE gives me: > > gdb/ada-lang.c: the result of this function in the TYPE_TARGET_TYPE of the > gdb/c-typeprint.c: couldn't resolve TYPE_TARGET_TYPE. Not much we can do. */ > gdb/gdbtypes.c: NOTE: This will return a typedef if TYPE_TARGET_TYPE for the typedef has > gdb/m2-typeprint.c: /* FIXME: TYPE_TARGET_TYPE used to be TYPE_DOMAIN_TYPE but that was > gdb/m2-typeprint.c: wrong. Not sure if TYPE_TARGET_TYPE is correct though. */ > gdb/m2-typeprint.c: * type of _m2_contents is a pointer. The TYPE_TARGET_TYPE > > All those occurrences are in comments, but I think that it would help > future readers to update those new spots as well. Yeah, there are some occurences for other macros as well. I will update these to say "type::target_type" instead. There are some occurences (not of TYPE_TARGET_TYPE but some other macro) that is in some commented out code that is probably quite stale. I don't know how relevant it is to update that, but I guess it doesn't hurt. > Otherwise, and for what it is worth considering I am not a maintainer, > this looks reasonable to me. Thanks for taking the time to make those > tree-wide changes! Cool, thanks for taking a look. Simon