gdb: add missing regcache_map_entry array null terminators in aarch64-linux-tdep.c

Fix two spots in aarch64-linux-tdep.c that build regcache_map_entry
arrays without a null terminator.  The null terminators are needed for
regcache::transfer_regset and regcache_map_entry_size to work properly.

Change-Id: I3224a314e1360b319438f32de8c81e70ab42e105
Reviewed-By: John Baldwin <jhb@FreeBSD.org>
Approved-By: Luis Machado <luis.machado@arm.com>
This commit is contained in:
Simon Marchi 2023-11-29 11:35:23 -05:00
parent c47886c7a1
commit 9d8fc40eb0

View file

@ -1497,7 +1497,9 @@ aarch64_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
/* Create this on the fly in order to handle the ZA register size. */
const struct regcache_map_entry za_regmap[] =
{
{ 1, tdep->sme_za_regnum, (int) std::pow (sve_vl_from_vq (tdep->sme_svq), 2) }
{ 1, tdep->sme_za_regnum,
(int) std::pow (sve_vl_from_vq (tdep->sme_svq), 2) },
{ 0 }
};
const struct regset aarch64_linux_za_regset =
@ -1518,7 +1520,8 @@ aarch64_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
{
const struct regcache_map_entry zt_regmap[] =
{
{ 1, tdep->sme2_zt0_regnum, AARCH64_SME2_ZT0_SIZE }
{ 1, tdep->sme2_zt0_regnum, AARCH64_SME2_ZT0_SIZE },
{ 0 }
};
/* We set the register set size to REGSET_VARIABLE_SIZE here because