diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2023-11-29 11:35:23 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2023-12-01 11:20:34 -0500 |
commit | 9d8fc40eb0e611162844eb7b89f1c76875153fbe (patch) | |
tree | 1c4d275f5325637ccb4ce64f8c4ec3272a1751a8 /gdb | |
parent | c47886c7a1dd66d8b8ada57f53685d238fac2510 (diff) | |
download | gdb-9d8fc40eb0e611162844eb7b89f1c76875153fbe.zip gdb-9d8fc40eb0e611162844eb7b89f1c76875153fbe.tar.gz gdb-9d8fc40eb0e611162844eb7b89f1c76875153fbe.tar.bz2 |
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>
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/aarch64-linux-tdep.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c index cd99b33..5be887a 100644 --- a/gdb/aarch64-linux-tdep.c +++ b/gdb/aarch64-linux-tdep.c @@ -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 |