From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id TdjwMiQ+62WlNz4AWB0awg (envelope-from ) for ; Fri, 08 Mar 2024 11:34:44 -0500 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=UfyZlOrT; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id BD8FA1E0D2; Fri, 8 Mar 2024 11:34:44 -0500 (EST) 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 A8DB11E092 for ; Fri, 8 Mar 2024 11:34:42 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 37428385DC2E for ; Fri, 8 Mar 2024 16:34:42 +0000 (GMT) Received: from omta040.useast.a.cloudfilter.net (omta040.useast.a.cloudfilter.net [44.202.169.39]) by sourceware.org (Postfix) with ESMTPS id BA9CF3858D33 for ; Fri, 8 Mar 2024 16:34:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BA9CF3858D33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BA9CF3858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709915662; cv=none; b=oYksMrrkpAot0i92OkQVzZ3ud5+lNpsOTKhB+OrytSm0maxpQfJDmnVZ8gR5TFn+3K+YuiKO9FSW0vD1B/LXYgsHApxLRV4WIdDuaAEn/NBE1RL38TRY2ygLMVETwqa+W00LnIUNdS1Bs5LZTX11WHCY7TanjoKYPC0N2GyiQBM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709915662; c=relaxed/simple; bh=C4FGJltHt8uX+hpYxop08RFiQPWXTu7AL8Lq9Zusuxs=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=GGBjWeYJCETQAS5SLOw2f+oKtWBUux0pIJXjO3CnFaXF0CTJjH9Qg6hUDsxydN+Pcz5T5BQnvX/OwC1fF6DIy3pHO28LrFwKl3kXRU8iDEyej6BIdeX/j6qhmyf6bTIgWJdOe2nk848BBlPlTidOzl/V1juOvF7ta4rVIE/NBus= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-6003a.ext.cloudfilter.net ([10.0.30.151]) by cmsmtp with ESMTPS id iTEzrX54rl9dRidAoraQsd; Fri, 08 Mar 2024 16:34:19 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id idAor3p3fZftYidAorII6D; Fri, 08 Mar 2024 16:34:18 +0000 X-Authority-Analysis: v=2.4 cv=DLOJ4TNb c=1 sm=1 tr=0 ts=65eb3e0a a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=K6JAEmCyrfEA:10 a=Qbun_eYptAEA:10 a=20KFwNOVAAAA:8 a=CCpqsmhAAAAA:8 a=D1XfQ55TD3knAULj5YMA:9 a=_SAKN40iBToA:10 a=ul9cdbp4aOFLsgKbc677:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=dFmrKCa7dqr+sD54clFxAD2sLifGetc+VBVyVUkVC80=; b=UfyZlOrT8+aH7/1XqbY12XmkQu nGuxq63qvo6aEgHL9ZmVxAML58x2ko6396TK/wOr+tOFwt7w61FKPNg3HQmoxEs7HYKvoF/aSL079 YS1lh2NWwnkWhcssQV18pqaq/; Received: from 97-122-82-115.hlrn.qwest.net ([97.122.82.115]:42956 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1ridAn-003nJk-3C; Fri, 08 Mar 2024 09:34:18 -0700 From: Tom Tromey To: Guinevere Larsen Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 1/4] gdb: make gdbarch store a vector of frame unwinders References: <20240306125135.766567-1-blarsen@redhat.com> <20240306125135.766567-2-blarsen@redhat.com> X-Attribution: Tom Date: Fri, 08 Mar 2024 09:34:17 -0700 In-Reply-To: <20240306125135.766567-2-blarsen@redhat.com> (Guinevere Larsen's message of "Wed, 6 Mar 2024 13:51:32 +0100") Message-ID: <87y1asr8c6.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.82.115 X-Source-L: No X-Exim-ID: 1ridAn-003nJk-3C X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-82-115.hlrn.qwest.net (murgatroyd) [97.122.82.115]:42956 X-Source-Auth: tom+tromey.com X-Email-Count: 16 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfIztDLj07NANtYBCoUsTFTThFR5UdhK3M7te7xUs3zZSLsiLg0t02hnYiSNqgJf5vzgf2UhnHjkDOleycc9hWHFYDfck0Q9oWVhaiqfirroT1tWi3mLR b7T0hsIE9VF1LzY1ulhMcRC8cK1VoN/OFn12i4bRv4M3v2UFEm9B5e3R/ck/UGuFcPK6AEFZeuLFVo+e0GYnmmpq1UDgj1Taiu8= X-Spam-Status: No, score=-3015.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no 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.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 >>>>> Guinevere Larsen writes: > Before this commit, all frame unwinders would be stored in the obstack > of a gdbarch and accessed by using the registry system. This made for > unwieldy code, and unnecessarily complex logic in the frame_unwinder > implementation, along with making frame_unwind structs be unable to have > non-trivial constructors. > Seeing as a future patch of this series wants to refactor the > frame_unwind struct to use inheritance, obstack storage would no longer > be viable. In preparation for that change, this commit adds an > std::vector to gdbarch to store the unwinders in. > There should be no user-visible changes. I'm not really sure about this patch. Like on the one hand, it is fine. The arch is going to store the unwinder table. On the other hand, the registry system is there to let modules be kind of independent. The lines are blurry though. > +std::vector& Missing spaces in here. > -static const registry::key > - frame_unwind_data; An alternative approach would be to just use a different type in here. This can use the default destruction approach and then it's just allocated with 'new'. So then you can use any old C++ type. FWIW I think the real issue with obstack allocation isn't constructors but destruction. See https://sourceware.org/pipermail/gdb-patches/2024-February/206888.html Tom