Blame SOURCES/gdb-rhbz1187581-power8-regs-not-in-8.2-13of15.patch

190f2a
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
190f2a
From: Keith Seitz <keiths@redhat.com>
190f2a
Date: Fri, 11 Jan 2019 17:02:18 -0500
190f2a
Subject: gdb-rhbz1187581-power8-regs-not-in-8.2-13of15.patch
190f2a
190f2a
;; [PowerPC] Reject tdescs with VSX and no FPU or Altivec
190f2a
;; Pedro Franco de Carvalho, RH BZ 1187581
190f2a
190f2a
[PowerPC] Reject tdescs with VSX and no FPU or Altivec
190f2a
190f2a
Currently rs6000_gdbarch_init will accept a tdesc with the
190f2a
"org.gnu.gdb.power.vsx" feature but without the
190f2a
"org.gnu.gdb.power.altivec" or "org.gnu.gdb.power.fpu".
190f2a
190f2a
It isn't clear from the standard features documentation that these are
190f2a
requirements.  However, these tdescs would cause trouble in the VSX
190f2a
pseudo-register functions, so this patch will cause them to be
190f2a
rejected.
190f2a
190f2a
gdb/ChangeLog:
190f2a
2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
190f2a
190f2a
    * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
190f2a
    without altivec or fpu.
190f2a
190f2a
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
190f2a
--- a/gdb/rs6000-tdep.c
190f2a
+++ b/gdb/rs6000-tdep.c
190f2a
@@ -6096,7 +6096,8 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
190f2a
 	    valid_p &= tdesc_numbered_register (feature, tdesc_data,
190f2a
 						PPC_VSR0_UPPER_REGNUM + i,
190f2a
 						vsx_regs[i]);
190f2a
-	  if (!valid_p)
190f2a
+
190f2a
+	  if (!valid_p || !have_fpu || !have_altivec)
190f2a
 	    {
190f2a
 	      tdesc_data_cleanup (tdesc_data);
190f2a
 	      return NULL;