From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id WeJcOw/cQWqCzhwAWB0awg (envelope-from ) for ; Sun, 28 Jun 2026 22:44:31 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=yS0R2w1/; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id EDAA01E098; Sun, 28 Jun 2026 22:44:31 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.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 autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (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 690C81E070 for ; Sun, 28 Jun 2026 22:44:31 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F181B4BA2E26 for ; Mon, 29 Jun 2026 02:44:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F181B4BA2E26 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=yS0R2w1/ Received: from mail-dy1-x1329.google.com (mail-dy1-x1329.google.com [IPv6:2607:f8b0:4864:20::1329]) by sourceware.org (Postfix) with ESMTPS id 18CF24BA2E28 for ; Mon, 29 Jun 2026 02:44:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 18CF24BA2E28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 18CF24BA2E28 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1329 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1782701047; cv=none; b=C266wWmxmsH9a0FRebSplNYQB6N84bnoG5KVdCZlwN+1UkYFaXIqGe9b6u3h2Vz3234BOv7QHbcC44z5R0TYpKtc+zAn2DL2BFHDwXp8kMDIenqBX/XpI8CBPtzMOoBf0j9Is+LDfipD0C+xPGDmaf/9YnUQylZmpsM67fle3Rg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1782701047; c=relaxed/simple; bh=rMCXxg4TbjL+CrAuHahBfXONJpkhuUVvhZjpx2w+GK8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=uXeZ10zMpv7gm0A02oYpSYtttoBxAtN4Rl5e4aHtjuYrtOG09wmqeaUyVFya6Jyt1DOoMfHwJIc+mTEiaMWy1BlQM4kfK/205k0W7c1R/lWgh/R1jLavJ8oN8W0gXIoeiIAfM2i0I4EfB2P19TLzbbt8YXiaxuB4JWHj5vq8uMA= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=yS0R2w1/ DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 18CF24BA2E28 Received: by mail-dy1-x1329.google.com with SMTP id 5a478bee46e88-30c591fb1cbso4378000eec.1 for ; Sun, 28 Jun 2026 19:44:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1782701046; x=1783305846; darn=sourceware.org; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=sWCz2HnzvazfgsWrCH/XPBsMQHgbEikTHHeGRz6j/Tg=; b=yS0R2w1/QxlKwUKS0DtK8DeF5O+j9EpEmy+91sgX65Riwb4sAlIig/B5dgV9lJCVT3 e47xN3XNt/EVmDEAqFogleU9nMZMq512Umo2LQfAdDuKUnryJaJ8XL9NxVtQ9E7PRcGb IAz95Mt0zoVhTM5FKobqYE4lT4aoX0BU+WNpkJn9AVCt/a6WArUoIuZZoihANww4VxSe nG/sVbKKFt1fOAAHw5LMsLEvb1HgpOiPLG0jwYzGEdFS3tbne8TV5p1HPQsYuxuR11KK MlnzN1yzETVoxCUeEhMbxDIdhjoOXyOpJ2gmTfPQVA6b2yMuUTW/bByKrY0Xvy2pnPSE k4yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782701046; x=1783305846; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=sWCz2HnzvazfgsWrCH/XPBsMQHgbEikTHHeGRz6j/Tg=; b=HmAZPH9M8zIAy3SUsKqYvEFyOJU5Cm4XDuCRTQsb4mIW5CuWamO5lYmr1ei8pGDqBB kARpwAIbyqt2GRBXMOeQhOY8MaS+dWMoX3nF0gNzP7SF4fqe4Mc60qFz1VMg9dYwVMsy C0Fnjl7YTfMi+zFXJnM06AQ+RztL4M1gBGM/T3NAgwDYoCDNSy57yYViX5Bh1/u0pTet xa9eXVsIozEDzIjlytQqxeW6pC0M8pDwYf7Vh3xcv6XryI5Lcp9c83MJkL3viECFaQSn rBBTwv3sDy9MelViKJRjrmYYKtlJ4HVHR3LN6pR/ziG4mr9qGuQ02q6ipYdqpHYjbWoO Qgmw== X-Gm-Message-State: AOJu0Ywu5FVeHia2Dzxc16NNODLMAFtDg+CDohKWCFafIqPuRhcZOEYa T+6/Ryl0dSDl9xqHBJ4MMY/U9q54UEa0FgNd3hjuzKZ5JK3LTb5susMpkEjkEmJyvQA= X-Gm-Gg: AfdE7cnG2x6O5BziLziv3YpLsNlo9zg+PkJRA9Qy3pobyBPFO6zNSZ2yWN6xdXvYO9R ww6IaUajoagoLV3SuO1AkkWDC0IwkuDdXpIG7qRhs1IjuydOvuLpfuSusxCX7RQO5y5OvPqkvPf SSeLbsW+l+/Z6hD2C3778FOfTklu/MQSkksEtpg6jwW6VpPAbshIIoi3JHzIkjYoKtTCxAGwMcv xHz4cYO4zp5chJQGVGYIofNLnrjyJzbCD7by5hAz9Wf5oNg74cU4jzFLS+x3OOsl3SYZ9I2BVxp vvjm+kD/+iyYzpuxPcYMBy5c9gGLESeDcTYE2s3LfP7TLX/aHtC+ZZQfX2K8xvvbtWNnnyhFp8+ wg+N1Ja2i66r6itVNKxUZaRod9HmHUYJWxhAJY+iUDB7aGCTCxCE9nK5osEQO9Z0qqDxDJFFl3r feHIquZFKGwEavarSZUeHHYgs= X-Received: by 2002:a05:7300:fb8d:b0:304:b14:ec53 with SMTP id 5a478bee46e88-30c84dab521mr13521085eec.27.1782701045980; Sun, 28 Jun 2026 19:44:05 -0700 (PDT) Received: from localhost ([2804:14d:7e39:8083:33bc:f32e:9aa5:b915]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-30c7c4ca240sm42827361eec.4.2026.06.28.19.44.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Jun 2026 19:44:05 -0700 (PDT) From: Thiago Jung Bauermann To: Cc: , , , , Subject: Re: [PATCH v2 6/7] gdb/aarch64: Add core file support for FEAT_S1POE In-Reply-To: <20260626180821.376406-7-srinath.parvathaneni@arm.com> (srinath parvathaneni's message of "Fri, 26 Jun 2026 18:08:20 +0000") References: <20260626180821.376406-1-srinath.parvathaneni@arm.com> <20260626180821.376406-7-srinath.parvathaneni@arm.com> User-Agent: mu4e 1.14.2; emacs 30.2 Date: Mon, 29 Jun 2026 02:44:03 +0000 Message-ID: <87tsqmkqvg.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain 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 writes: > From: Srinath Parvathaneni > > Add support for POR_EL0 dumps/reads for core files. This descriptions is incomplete. The patch is also about adding support for reading the POE value in the signal frame. > --- > gdb/aarch64-linux-tdep.c | 51 ++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 51 insertions(+) > > diff --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c > index b8a02ab9972..1d6d4c94b84 100644 > --- a/gdb/aarch64-linux-tdep.c > +++ b/gdb/aarch64-linux-tdep.c > @@ -171,6 +171,7 @@ > #define AARCH64_ZT_MAGIC 0x5a544e01 > #define AARCH64_GCS_MAGIC 0x47435300 > #define AARCH64_FPMR_MAGIC 0x46504d52 > +#define AARCH64_POE_MAGIC 0x504f4530 > > /* Defines for the extra_context that follows an AARCH64_EXTRA_MAGIC. */ > #define AARCH64_EXTRA_DATAP_OFFSET 8 > @@ -220,6 +221,9 @@ > /* FPMR constants. */ > #define AARCH64_FPMR_OFFSET 8 > > +/* POE constants. */ > +#define AARCH64_POE_OFFSET 8 > + > /* Holds information about the signal frame. */ > struct aarch64_linux_sigframe > { > @@ -273,6 +277,11 @@ struct aarch64_linux_sigframe > /* FPMR value. */ > CORE_ADDR fpmr = 0; > > + /* True if we have an POE entry in the signal context, false otherwise. */ > + bool poe_available = false; > + /* FPMR value. */ > + CORE_ADDR poe = 0; > + Extraneous empty line. > }; > > /* Read an aarch64_ctx, returning the magic value, and setting *SIZE to the > @@ -605,6 +614,22 @@ aarch64_linux_read_signal_frame_info (const frame_info_ptr &this_frame, > section += size; > break; > } > + case AARCH64_POE_MAGIC: > + { > + gdb_byte buf[8]; > + if (target_read_memory (section + AARCH64_POE_OFFSET, > + buf, 8) != 0) > + { > + warning (_("Failed to read the POE section address from the" > + " signal frame context.")); > + section += size; > + break; > + } > + signal_frame.poe = extract_unsigned_integer (buf, 8, byte_order); > + signal_frame.poe_available = true; > + section += size; > + break; > + } > case AARCH64_EXTRA_MAGIC: > { > /* Extra is always the last valid section in reserved and points to > @@ -775,6 +800,13 @@ aarch64_linux_sigframe_init (const struct tramp_frame *self, > signal_frame.fpmr); > } > > + /* Handle POE register. */ > + if (tdep->has_poe () && signal_frame.poe_available != 0) poe_available is a boolean, so you can just use "&& signal_frame.poe_available". > + { > + trad_frame_set_reg_value (this_cache, tdep->poe_regnum, > + signal_frame.poe); > + } > + > /* Restore the tpidr2 register, if the target supports it and if there is > an entry for it. */ > if (signal_frame.tpidr2_section != 0 && tdep->has_tls () -- Thiago (he/him)