aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorPedro Franco de Carvalho <pedromfc@linux.ibm.com>2018-10-26 09:37:55 -0300
committerPedro Franco de Carvalho <pedromfc@linux.ibm.com>2018-10-26 10:18:57 -0300
commit81ab84fd6cdaab121988e0c424f8cdc0ae472e14 (patch)
tree591f7478c84994f3ed00bae4816b7995f6acf475 /gdb
parent232bfb8644f0a083969d8359a37bc23764642611 (diff)
downloadgdb-81ab84fd6cdaab121988e0c424f8cdc0ae472e14.zip
gdb-81ab84fd6cdaab121988e0c424f8cdc0ae472e14.tar.gz
gdb-81ab84fd6cdaab121988e0c424f8cdc0ae472e14.tar.bz2
[PowerPC] Reject tdescs with VSX and no FPU or Altivec
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: 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com> * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but without altivec or fpu.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/rs6000-tdep.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e07af9d..74c7b39 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
+
+ * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
+ without altivec or fpu.
+
2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 54591db..7e41d8f 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -6042,7 +6042,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;