This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH v3 11/12] [PowerPC] Reject tdescs with VSX and no FPU or Altivec
- From: Pedro Franco de Carvalho <pedromfc at linux dot ibm dot com>
- To: gdb-patches at sourceware dot org
- Cc: uweigand at de dot ibm dot com, edjunior at gmail dot com
- Date: Tue, 14 Aug 2018 17:06:08 -0300
- Subject: [PATCH v3 11/12] [PowerPC] Reject tdescs with VSX and no FPU or Altivec
- References: <20180814200609.19999-1-pedromfc@linux.ibm.com>
Currently rs6000_gdbarch_init will accept a tdesc with the
"org.gnu.gdb.power.vsx" feature but without the
"org.gnu.gdb.power.altivec" or "org.gnu.gdb.power.fpu".
It isn't clear from the standard features documentation that these are
requirements. However, these tdescs would cause trouble in the VSX
pseudo-register functions, so this patch will cause them to be
rejected.
gdb/ChangeLog:
YYYY-MM-DD Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
* rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
without altivec or fpu.
---
gdb/rs6000-tdep.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index a4998c1a39..8920a18089 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -6044,7 +6044,8 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
valid_p &= tdesc_numbered_register (feature, tdesc_data,
PPC_VSR0_UPPER_REGNUM + i,
vsx_regs[i]);
- if (!valid_p)
+
+ if (!valid_p || !have_fpu || !have_altivec)
{
tdesc_data_cleanup (tdesc_data);
return NULL;
--
2.13.6