From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2610:1c1:1:606c::19:2]) by sourceware.org (Postfix) with ESMTPS id 9D6BA385840E for ; Mon, 21 Nov 2022 18:21:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9D6BA385840E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=FreeBSD.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits)) (Client CN "mx1.freebsd.org", Issuer "R3" (verified OK)) by mx2.freebsd.org (Postfix) with ESMTPS id 4NGG1t6dN6z3Gs5 for ; Mon, 21 Nov 2022 18:21:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NGG1t5vmvz3Q5H for ; Mon, 21 Nov 2022 18:21:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669054914; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1OpV+jTJXfr56OMVECefCZRoiP0fYD0eTS62xk1tEN4=; b=jCVyWGU4ZKsCgHO9hhkf7pYi2uvEEnG72WNLf0Q2HNmXd0uABRFxG6uQP2rLEZD983vlrn 9PspIF++kxccRYIa36gWnS7zIEiLhtXnQbGGjAAk2+uz9yQu7K3TK6/Zo6dPeNUP+q2w7d f0qc1TVPAQk3dSPylowzbgQ/fifg0W+VZptLQewTJ9fHu47lzn+ZFGsp5YReFShxe+1UsL O8laPh4x7fWnVrKo2hfqHwgHaqX5cXRXecmm2sklkvYdmHx7ANVuY5oM6N1ZoaOTqyeGM4 pXWoCWATpw5DFg7cFnlaP30ZF+SUthB1tPBEvw4Q3mFEjlRkmRWfF3CB7DFu1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669054914; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1OpV+jTJXfr56OMVECefCZRoiP0fYD0eTS62xk1tEN4=; b=Vt9cSrkRH4lzVsqGe+ZBOiDZLoJWMn9YkUDbyg3vkaQa4m+crc3oc/bRp42Ci1g03qdapL 4HslqmQpNnq1qDFObmxUces1+8F4YsfX9iJ/xlppdmyF90UcAh62uBfOjo0pYbZA2coYZn ZvoEKZn6TgruChx/ZbaLhf2fTfWQmcnTu5oB25G4xgfvrZdNVZG/Bw+vMh5SOzjixxJiit KYKgeB5tt9Fbvmq4vfKcpB/vfnnDoTccz3+4rEKKm3cX2Xping7m8AKrf1lZr1MbdNSIQ9 gA8RcB9vN0UH9zEqc2Jfu86wygWL1UFZ4XNMwk3ajHdfqYiaDhb7AiJOdeglTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1669054914; a=rsa-sha256; cv=none; b=W2IPicmvEAf8mu7ln/y139xzDs6GB43K5r1lcxqwnltZVHOakO7OqGl5XVi+WsPZ4dgHSw bnccO6wqipRUSnzW7530ZloCmd9fPNvpijFGZwYONFRzEZhfIcgo2z2NpM0owvMnoJlpoB ju5FbvpdxN5ijvaKVz+m6WmKBPrisYOpn9jhizPgiyoOo/xI6yUKdKOakqVUTGyPuNcv7N +/0HucWMMcxuuJOxsw4Eqr0K9pn0aRR70B0yne5Tc2Dpt+h3pVsqkFYUib/ZrlGuasU4tu VQskcZb5TzCkG0htQ1f5PKnrqEZj0leM+9lLgRVK/7maUip0Z82w3Orjv1zyOA== Received: from [IPV6:2601:648:8680:16b0:75c4:4b:859:56f1] (unknown [IPv6:2601:648:8680:16b0:75c4:4b:859:56f1]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4NGG1t3X6Jz1Kn5 for ; Mon, 21 Nov 2022 18:21:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <5afda5c0-5ad6-6224-0547-920ae3473334@FreeBSD.org> Date: Mon, 21 Nov 2022 10:21:51 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PING 5] [PATCH 0/5] Improve support for regcache_map_entry with variable register base Content-Language: en-US From: John Baldwin To: gdb-patches@sourceware.org References: <20220708005816.9408-1-jhb@FreeBSD.org> <099949c8-edc0-a7b9-cf5e-9eebdd13e759@FreeBSD.org> <05fb4402-32c5-123d-075a-5a7e78d2a5fd@FreeBSD.org> <5dabc301-e7af-1e8c-a70d-555ce22c8064@FreeBSD.org> <13906179-7682-8d0e-06fa-e50084029a17@FreeBSD.org> In-Reply-To: <13906179-7682-8d0e-06fa-e50084029a17@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE,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 10/20/22 1:26 PM, John Baldwin wrote: > On 9/20/22 10:50 AM, John Baldwin wrote: >> On 8/22/22 7:11 PM, John Baldwin wrote: >>> On 7/21/22 7:53 AM, John Baldwin wrote: >>>> On 7/7/22 5:58 PM, John Baldwin wrote: >>>>> When I added support for TLS to the ARM and AArch64 architectures on >>>>> FreeBSD, I had to construct register maps and associated register sets >>>>> on the fly in both the callback for processing register core dump >>>>> notes and in the native target routines to fetch and store registers. >>>>> >>>>> The reason I had to create these on the fly is that the register >>>>> number was not known at compile time, so the register map and register >>>>> set could not be constant structures shared among the -tdep and -nat >>>>> code the way other register sets were. >>>>> >>>>> This series aims to rectify that. The first patch adds new variants >>>>> of regcache::collect_regset and regcache::supply_regset that accept an >>>>> additional 'regbase' argument. When these functions iterate over >>>>> regcache map entries, the effective register number for the entry is >>>>> computed by adding the value in the entry to 'regbase' permittting the >>>>> regcache map entries to hold relative register numbers for a block of >>>>> registers. >>>>> >>>>> The rest of the series then makes use of this to use a single, shared >>>>> register map and register set for TLS on FreeBSD/ARM and >>>>> FreeBSD/AArch64. Using this requires custom supply and collect regset >>>>> routines for the TLS regsets that extract the base register number >>>>> from the gdbarch's tdep and invoke the new regcache class methods, so >>>>> patch 2 updates the wrappers for dealing with regsets in fbsd-nat to >>>>> always invoke the regset routines from the regset instead of directly >>>>> calling the default functions. Patch 3 is another change to fbsd-nat >>>>> to cope with the fact that regcache_map_supplies() needs to pass in >>>>> the relative register number in the wrapper routines rather than the >>>>> absolute register number. >>>>> >>>>> Patches 4 and 5 are the updates to the ARM and AArch64 FreeBSD >>>>> architectures and targets. >>>>> >>>>> I have not done the work to make use of this in the Linux AArch64 >>>>> architecture, though I think it would apply to at least the TLS and >>>>> MTE register sets there in a similar fashion. SVE is harder because >>>>> the register sizes change (though SVE might be able to make use of >>>>> this if register_size() returns the right value by using a register >>>>> size of 0 in the relevant register cache map entries). >>>>> >>>>> John Baldwin (5): >>>>> regcache: Add collect/supply_regset variants that accept a register >>>>> base. >>>>> fbsd-nat: Use regset supply/collect methods. >>>>> fbsd-nat: Pass an optional register base to the register set helpers. >>>>> arm-fbsd: Use a static regset for the TLS register set. >>>>> aarch64-fbsd: Use a static regset for the TLS register set. >>>>> >>>>> gdb/aarch64-fbsd-nat.c | 36 +++------------------------ >>>>> gdb/aarch64-fbsd-tdep.c | 54 ++++++++++++++++++++++++++++------------- >>>>> gdb/aarch64-fbsd-tdep.h | 1 + >>>>> gdb/arm-fbsd-nat.c | 34 +++----------------------- >>>>> gdb/arm-fbsd-tdep.c | 52 +++++++++++++++++++++++++++------------ >>>>> gdb/arm-fbsd-tdep.h | 1 + >>>>> gdb/fbsd-nat.c | 42 +++++++++++++++++--------------- >>>>> gdb/fbsd-nat.h | 49 +++++++++++++++++++++---------------- >>>>> gdb/regcache.c | 28 ++++++++++++++++++--- >>>>> gdb/regcache.h | 24 ++++++++++++++++-- >>>>> 10 files changed, 181 insertions(+), 140 deletions(-) >>>> >>>> Ping. >>>> >>> >>> >> >> Pinging again. Only patch 1 needs approval by another maintainer, the rest >> are FreeBSD specific. >> > > Is there a better way to ping things such that this gets on someone's list to look at? -- John Baldwin