From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id CLrDKX8zfWMYfRsAWB0awg (envelope-from ) for ; Tue, 22 Nov 2022 15:39:27 -0500 Received: by simark.ca (Postfix, from userid 112) id A74CC1E124; Tue, 22 Nov 2022 15:39:27 -0500 (EST) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=yT2tzak/; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_MED,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 607C41E0CB for ; Tue, 22 Nov 2022 15:39:27 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0DFE8385841E for ; Tue, 22 Nov 2022 20:39:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0DFE8385841E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1669149566; bh=Zgb0NoGbdRMbtmFDvFUCKE2iMH/0HeLuNQ53cI3xTBU=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=yT2tzak/qhGQVThD3M7HQ3mlK2lm/PzMcC8PBPg7wxOGtIdc34i545e/9mY5Z8vZt Xnxx6A4cwmxnhvgODz/kjDSMZ3JA/oCrj37VK1XalNAV/nMfiww9qX9draODJQCKuE 8cL8pPak3lrzvfFDhgfxJ7a5Hes44iOndT8LQMys= Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id E9DCE3858D35 for ; Tue, 22 Nov 2022 20:39:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E9DCE3858D35 Received: from [172.16.0.64] (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)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 857DD1E0CB; Tue, 22 Nov 2022 15:39:06 -0500 (EST) Message-ID: <6e6af4ae-83a7-d444-7a79-0934091b77f7@simark.ca> Date: Tue, 22 Nov 2022 15:39:06 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [PATCH 4/5] arm-fbsd: Use a static regset for the TLS register set. Content-Language: fr To: John Baldwin , gdb-patches@sourceware.org References: <20220708005816.9408-1-jhb@FreeBSD.org> <20220708005816.9408-5-jhb@FreeBSD.org> In-Reply-To: <20220708005816.9408-5-jhb@FreeBSD.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: , From: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" > diff --git a/gdb/arm-fbsd-tdep.c b/gdb/arm-fbsd-tdep.c > index 483820c1092..2a73643b763 100644 > --- a/gdb/arm-fbsd-tdep.c > +++ b/gdb/arm-fbsd-tdep.c > @@ -52,6 +52,12 @@ static const struct regcache_map_entry arm_fbsd_vfpregmap[] = > { 0 } > }; > > +static const struct regcache_map_entry arm_fbsd_tls_regmap[] = > + { > + { 1, 0, 4 }, > + { 0 } > + }; I would suggest adding a comment to say that this regno is relative, and relative to what. > + > /* In a signal frame, sp points to a 'struct sigframe' which is > defined as: > > @@ -151,6 +157,34 @@ const struct regset arm_fbsd_vfpregset = > regcache_supply_regset, regcache_collect_regset > }; > > +static void > +arm_fbsd_supply_tls_regset (const struct regset *regset, > + struct regcache *regcache, > + int regnum, const void *buf, size_t size) > +{ > + struct gdbarch *gdbarch = regcache->arch (); > + arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch); These can now be changed to: arm_gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); With those fixed, Approved-By: Simon Marchi Simon