aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/linux-low.h
diff options
context:
space:
mode:
authorPedro Franco de Carvalho <pedromfc@linux.ibm.com>2019-04-05 14:19:08 -0300
committerPedro Franco de Carvalho <pedromfc@linux.ibm.com>2019-04-05 14:19:08 -0300
commit0570503dd31bc20294e228339fcbdd39b19608cc (patch)
treebf66af4f818390674ca761e0bbf376d59abfb092 /gdb/gdbserver/linux-low.h
parent227a9e65b91958cb414ade82c614717579d8849e (diff)
downloadgdb-0570503dd31bc20294e228339fcbdd39b19608cc.zip
gdb-0570503dd31bc20294e228339fcbdd39b19608cc.tar.gz
gdb-0570503dd31bc20294e228339fcbdd39b19608cc.tar.bz2
Use linux_get_auxv to get AT_PHDR in the PPC stub
This patch fixes a build error due to a call to ppc_get_auxv that was left over after linux_get_hwcap and linux_get_hwcap2 were introduced in: 974c89e0882ddb03e294eca76a9e3d3bef90eacf gdbserver: Add linux_get_hwcap Because the missing call fetched AT_PHDR and not AT_HWCAP, linux_get_auxv is now visible. This use also required ppc_get_auxv to return a status variable indicating that the AT_PHDR entry was not found separately from the actual value of of the auxv entry. Therefore, the new linux_get_auxv function is changed to return a status variable and write the entry value to a pointer passed as an argument. Note that linux_get_hwcap and linux_get_hwcap2 still use the return value as both an indicator of that the entry wasn't found and as the actual value of the entry. gdb/gdbserver/ChangeLog: 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com> * linux-low.c (linux_get_auxv): Remove static. Return auxv entry value in argument pointer, return 1 if the entry is found and 0 otherwise. Move comment. (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv. * linux-low.h (linux_get_auxv): Declare. * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
Diffstat (limited to 'gdb/gdbserver/linux-low.h')
-rw-r--r--gdb/gdbserver/linux-low.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/gdbserver/linux-low.h b/gdb/gdbserver/linux-low.h
index d825184..d5d074e 100644
--- a/gdb/gdbserver/linux-low.h
+++ b/gdb/gdbserver/linux-low.h
@@ -435,6 +435,14 @@ bool thread_db_thread_handle (ptid_t ptid, gdb_byte **handle, int *handle_len);
extern int have_ptrace_getregset;
+/* Search for the value with type MATCH in the auxv vector with
+ entries of length WORDSIZE bytes. If found, store the value in
+ *VALP and return 1. If not found or if there is an error, return
+ 0. */
+
+int linux_get_auxv (int wordsize, CORE_ADDR match,
+ CORE_ADDR *valp);
+
/* Fetch the AT_HWCAP entry from the auxv vector, where entries are length
WORDSIZE. If no entry was found, return zero. */