public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] [AArch64] Fix FFR register size for core files.
@ 2021-06-24 17:25 Luis Machado
  0 siblings, 0 replies; only message in thread
From: Luis Machado @ 2021-06-24 17:25 UTC (permalink / raw)
  To: gdb-patches

The FFR register has a size of VL bits, not 32 bits.

This causes issues when writing core files with the gcore command and when
reading them. The FFR register sometimes shows up with garbage data.

gdb/ChangeLog:

2021-06-24  Luis Machado  <luis.machado@linaro.org>

	* aarch64-linux-tdep.c
	(aarch64_linux_iterate_over_regset_sections): Fix FFR register size.
---
 gdb/aarch64-linux-tdep.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c
index d541c6a32d0..167035275a4 100644
--- a/gdb/aarch64-linux-tdep.c
+++ b/gdb/aarch64-linux-tdep.c
@@ -687,7 +687,7 @@ aarch64_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
 	{
 	  { 32, AARCH64_SVE_Z0_REGNUM, (int) (tdep->vq * 16) },
 	  { 16, AARCH64_SVE_P0_REGNUM, (int) (tdep->vq * 16 / 8) },
-	  { 1, AARCH64_SVE_FFR_REGNUM, 4 },
+	  { 1, AARCH64_SVE_FFR_REGNUM, (int) (tdep->vq * 16 / 8) },
 	  { 1, AARCH64_FPSR_REGNUM, 4 },
 	  { 1, AARCH64_FPCR_REGNUM, 4 },
 	  { 0 }
-- 
2.25.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-24 17:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-24 17:25 [PATCH] [AArch64] Fix FFR register size for core files Luis Machado

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).