This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Fix checks for VSX and Altivec availability on Power
- From: Edjunior Machado <emachado at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 22 Apr 2016 22:42:26 -0000
- Subject: [binutils-gdb] Fix checks for VSX and Altivec availability on Power
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0154d99053a95392380cd4629a89b0ac46df3737
commit 0154d99053a95392380cd4629a89b0ac46df3737
Author: Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
Date: Fri Apr 22 19:39:12 2016 -0300
Fix checks for VSX and Altivec availability on Power
gdb/ChangeLog
* ppc-linux-nat.c (ppc_linux_read_description): Use PPC_FEATURE_HAS_VSX
and PPC_FEATURE_HAS_ALTIVEC to check if such features are available.
Diff:
---
gdb/ChangeLog | 5 +++++
gdb/ppc-linux-nat.c | 6 ++++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 56f9644..91db2e3 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2016-04-22 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
+
+ * ppc-linux-nat.c (ppc_linux_read_description): Use PPC_FEATURE_HAS_VSX
+ and PPC_FEATURE_HAS_ALTIVEC to check if such features are available.
+
2016-04-22 Yao Qi <yao.qi@linaro.org>
* valops.c (read_value_memory): New local variable 'stack'.
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index bf91462..84c14a1 100644
--- a/gdb/ppc-linux-nat.c
+++ b/gdb/ppc-linux-nat.c
@@ -2419,7 +2419,8 @@ ppc_linux_read_description (struct target_ops *ops)
perror_with_name (_("Unable to fetch SPE registers"));
}
- if (have_ptrace_getsetvsxregs)
+ if (have_ptrace_getsetvsxregs
+ && (ppc_linux_get_hwcap () & PPC_FEATURE_HAS_VSX))
{
gdb_vsxregset_t vsxregset;
@@ -2432,7 +2433,8 @@ ppc_linux_read_description (struct target_ops *ops)
perror_with_name (_("Unable to fetch VSX registers"));
}
- if (have_ptrace_getvrregs)
+ if (have_ptrace_getvrregs
+ && (ppc_linux_get_hwcap () & PPC_FEATURE_HAS_ALTIVEC))
{
gdb_vrregset_t vrregset;