aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/linux-low.h
diff options
context:
space:
mode:
authorAlan Hayward <alan.hayward@arm.com>2019-03-25 10:44:11 +0000
committerAlan Hayward <alan.hayward@arm.com>2019-03-26 16:27:43 +0000
commit974c89e0882ddb03e294eca76a9e3d3bef90eacf (patch)
treeb90e670ef3e07b1ca0f30c004eb5cd006077f7b5 /gdb/gdbserver/linux-low.h
parent7ea79cb3affe1ae1d196f511ace044c015e0ccd3 (diff)
downloadgdb-974c89e0882ddb03e294eca76a9e3d3bef90eacf.zip
gdb-974c89e0882ddb03e294eca76a9e3d3bef90eacf.tar.gz
gdb-974c89e0882ddb03e294eca76a9e3d3bef90eacf.tar.bz2
gdbserver: Add linux_get_hwcap
In gdbserver, Tidy up calls to read HWCAP (and HWCAP2) by adding common functions, removing the Arm, AArch64, PPC and S390 specific versions. No functionality differences. gdb/gdbserver/ChangeLog: * linux-aarch64-low.c (aarch64_get_hwcap): Remove function. (aarch64_arch_setup): Call linux_get_hwcap. * linux-arm-low.c (arm_get_hwcap): Remove function. (arm_read_description): Call linux_get_hwcap. * linux-low.c (linux_get_auxv): New function. (linux_get_hwcap): Likewise. (linux_get_hwcap2): Likewise. * linux-low.h (linux_get_hwcap): New declaration. (linux_get_hwcap2): Likewise. * linux-ppc-low.c (ppc_get_auxv): Remove function. (ppc_arch_setup): Call linux_get_hwcap. * linux-s390-low.c (s390_get_hwcap): Remove function. (s390_arch_setup): Call linux_get_hwcap.
Diffstat (limited to 'gdb/gdbserver/linux-low.h')
-rw-r--r--gdb/gdbserver/linux-low.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/gdbserver/linux-low.h b/gdb/gdbserver/linux-low.h
index 1ade35d..d825184 100644
--- a/gdb/gdbserver/linux-low.h
+++ b/gdb/gdbserver/linux-low.h
@@ -435,4 +435,14 @@ bool thread_db_thread_handle (ptid_t ptid, gdb_byte **handle, int *handle_len);
extern int have_ptrace_getregset;
+/* Fetch the AT_HWCAP entry from the auxv vector, where entries are length
+ WORDSIZE. If no entry was found, return zero. */
+
+CORE_ADDR linux_get_hwcap (int wordsize);
+
+/* Fetch the AT_HWCAP2 entry from the auxv vector, where entries are length
+ WORDSIZE. If no entry was found, return zero. */
+
+CORE_ADDR linux_get_hwcap2 (int wordsize);
+
#endif /* GDBSERVER_LINUX_LOW_H */