From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id oItdFURYEmkByzMAWB0awg (envelope-from ) for ; Mon, 10 Nov 2025 16:25:24 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=polymtl.ca header.i=@polymtl.ca header.a=rsa-sha256 header.s=oct2025 header.b=WI/dKFGA; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 44AF31E0B8; Mon, 10 Nov 2025 16:25:24 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.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 ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 8B0FF1E04C for ; Mon, 10 Nov 2025 16:25:23 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1E2143858C40 for ; Mon, 10 Nov 2025 21:25:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1E2143858C40 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=polymtl.ca header.i=@polymtl.ca header.a=rsa-sha256 header.s=oct2025 header.b=WI/dKFGA Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 72A463858D2A for ; Mon, 10 Nov 2025 21:24:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 72A463858D2A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=polymtl.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=polymtl.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 72A463858D2A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=132.207.4.11 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762809857; cv=none; b=k5qAK3i1M9MebMyynLbs4fHgjK4JqMPOed7A8hgzCJ8jU84aIcjgwS2jjWbaVcyDnjZQBpE+4ZgUbTwtDnQWaDhg9L1ZlU6jV+MkDhVHY3nwUf8E7t/tu90EiaNsGNJbiUjYk8OdREygruWHbeCVOqS/fbvABpXfgvKrJ+y6P8M= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762809857; c=relaxed/simple; bh=8BziV/IuDsO+dxJ/03hz8vSQ/hzYvMU41xVjaqgOWqM=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=ZRUGMmUL/m4UEJTrPmNS1m/WGNKBbSIIwiYfN3c6HmWbLT8dUPzKQeSZxkbtKBSvj2YCHQsmQpUWAKCgWOdRlvX4tzBB+BQAxI4e2E93CMroJVdd/PqiZIyyZsCoTp/exrGiWwrSaX+QiDZmdHAv/aXFg2+YNrPk0uSuyxLNAU0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 72A463858D2A 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 5AALOBWx185411 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 10 Nov 2025 16:24:15 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 5AALOBWx185411 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=oct2025; t=1762809856; bh=bmrD3Di/8U5yImrgHAJDqLRxuMPYpDxepFsTH5PHUqw=; h=Date:Subject:To:Cc:From:In-Reply-To:From; b=WI/dKFGAdfE/ZY5/I8k56ShsMtn0eVbud26N2CQzZeUIBfrcnBesnggBe+vTZKLUt wyGMWy0zpfHWMbHEeUbZ/z7oOv+xQ8HMC/xZQCXMbCNqoQaHnYQU3Aqwc0T0RG2o2S f7sbCVDhzgU95OS+92RyuTdwF/OwH+8vJyy91e0SrePW2/cq9DcyY16eqHydKTPibX InC2WtAalf/YQ6RgF5P9VFwaAj+/aPv+rf20jmNxXRwD38d4NoIBf6/eTZ4RU9Xa66 hUUj9SsLnChut+Pt2x22EYwl3NoQI5xATljD8x8s2nwMuG5FKOVHETKxILq3wESSHb EfAG4gzh4MC2Q== Received: by simark.ca (Postfix) id E79F51E04C; Mon, 10 Nov 2025 16:24:10 -0500 (EST) Message-ID: Date: Mon, 10 Nov 2025 16:24:10 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] gdb: replace FRAME_OBSTACK_{C, Z}ALLOC macros with templated functions To: Thiago Jung Bauermann Cc: gdb-patches@sourceware.org References: <20251110052145.1636979-1-simon.marchi@polymtl.ca> <87cy5pbnf4.fsf@linaro.org> Content-Language: fr From: Simon Marchi In-Reply-To: <87cy5pbnf4.fsf@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Mon, 10 Nov 2025 21:24:11 +0000 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 11/10/25 4:14 PM, Thiago Jung Bauermann wrote: > simon.marchi@polymtl.ca writes: > >> From: Simon Marchi >> >> While reviewing a patch, I saw these macros and thought they could be >> modernized a bit. > > Nice! Just one comment: > > Most calls to the new functions don't use the 'struct' keyword, e.g.: > >> - cache = FRAME_OBSTACK_ZALLOC (struct aarch64_prologue_cache); >> + auto *cache = frame_obstack_zalloc (); > > while some do, e.g.: > >> - cache = FRAME_OBSTACK_ZALLOC (struct amd64_frame_cache); >> + auto *cache = frame_obstack_zalloc (); > > I suggest standardising on always omitting the struct keyword. In that situations, the keyword is necessary. I started by removing them all, but then compilation fails if there is also a function by that name. Simon