This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH v2 10/10] Remove reg2 section from Aarch64 SVE cores
- From: Alan Hayward <alan dot hayward at arm dot com>
- To: gdb-patches at sourceware dot org
- Cc: nd at arm dot com, Alan Hayward <alan dot hayward at arm dot com>
- Date: Wed, 6 Jun 2018 16:16:29 +0100
- Subject: [PATCH v2 10/10] Remove reg2 section from Aarch64 SVE cores
- Nodisclaimer: True
- References: <20180606151629.36602-1-alan.hayward@arm.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
reg2 sections in SVE binaries will cause gdb to segfault on loading
due to miscalculating the register size.
For now, simply remove reg2 from SVE core files. This results in
core files without any vector/float register. Full core support
for SVE will come in a later set of patches.
2018-06-06 Alan Hayward <alan.hayward@arm.com>
gdb/
* aarch64-linux-tdep.c
(aarch64_linux_iterate_over_regset_sections): Check for SVE.
---
gdb/aarch64-linux-tdep.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c
index 96dc8a1132..b05bb49ae8 100644
--- a/gdb/aarch64-linux-tdep.c
+++ b/gdb/aarch64-linux-tdep.c
@@ -227,10 +227,13 @@ aarch64_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
void *cb_data,
const struct regcache *regcache)
{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
cb (".reg", AARCH64_LINUX_SIZEOF_GREGSET, &aarch64_linux_gregset,
NULL, cb_data);
- cb (".reg2", AARCH64_LINUX_SIZEOF_FPREGSET, &aarch64_linux_fpregset,
- NULL, cb_data);
+ if (!tdep->has_sve ())
+ cb (".reg2", AARCH64_LINUX_SIZEOF_FPREGSET, &aarch64_linux_fpregset,
+ NULL, cb_data);
}
/* Implement the "core_read_description" gdbarch method. SVE not yet
--
2.15.1 (Apple Git-101)