public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@adacore.com>
Subject: [PATCH 1/3] Fix bugs in aarch64-ravenscar-thread.c
Date: Tue, 31 May 2022 06:57:29 -0600	[thread overview]
Message-ID: <20220531125731.1280943-2-tromey@adacore.com> (raw)
In-Reply-To: <20220531125731.1280943-1-tromey@adacore.com>

We found a few bugs in aarch64-ravenscar-thread.c.

First, some of the register offsets were incorrect.  The "bb-runtimes"
file for this runtime had the wrong offsets in comments, which GDB
took to be correct.  However, those comments didn't account for
alignment.  This patch adjusts the offsets.

Next, the "FPU Saved field" is not a register -- it is an
implementation detail of the runtime.  This is removed.

Finally, I think the FP registers are actually named V0-V31, and the
"Q" names are pseudo-registers.  This patch fixes the comment.
---
 gdb/aarch64-ravenscar-thread.c | 23 ++++++++++-------------
 1 file changed, 10 insertions(+), 13 deletions(-)

diff --git a/gdb/aarch64-ravenscar-thread.c b/gdb/aarch64-ravenscar-thread.c
index a60471d7275..dc35537e3d5 100644
--- a/gdb/aarch64-ravenscar-thread.c
+++ b/gdb/aarch64-ravenscar-thread.c
@@ -47,21 +47,18 @@ static const int aarch64_context_offsets[] =
   80,        88,        96,        88,
   NO_OFFSET,
 
-  /* Q0 - Q31 */
-  112,       128,       144,       160,
-  176,       192,       208,       224,
-  240,       256,       272,       288,
-  304,       320,       336,       352,
-  368,       384,       400,       416,
-  432,       448,       464,       480,
-  496,       512,       528,       544,
-  560,       576,       592,       608,
+  /* V0 - V31 */
+  128,       144,       160,       176,
+  192,       208,       224,       240,
+  256,       272,       288,       304,
+  320,       336,       352,       368,
+  384,       400,       416,       432,
+  448,       464,       480,       496,
+  512,       528,       544,       560,
+  576,       592,       608,       624,
 
   /* FPSR, FPCR */
-  104,       108,
-
-  /* FPU Saved field */
-  624
+  112,       116,
 };
 
 /* The register layout info.  */
-- 
2.34.1


  reply	other threads:[~2022-05-31 12:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-31 12:57 [PATCH 0/3] Ravenscar simplification + FPU feature Tom Tromey
2022-05-31 12:57 ` Tom Tromey [this message]
2022-05-31 12:57 ` [PATCH 2/3] Reimplement ravenscar registers using tables Tom Tromey
2022-05-31 12:57 ` [PATCH 3/3] Implement lazy FPU initialization for ravenscar Tom Tromey
2022-06-14 15:08 ` [PATCH 0/3] Ravenscar simplification + FPU feature Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220531125731.1280943-2-tromey@adacore.com \
    --to=tromey@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).