aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdb_proc_service.h
diff options
context:
space:
mode:
authorGary Benson <gbenson@redhat.com>2018-10-01 10:37:39 +0100
committerGary Benson <gbenson@redhat.com>2018-10-01 10:37:39 +0100
commit43b7e92b0c73d693d3b656b84b2a1181e40477ca (patch)
tree67c903d2e6e885643849f3833847b75dd88a0c71 /gdb/gdb_proc_service.h
parent3795e814428a269a3528d3d9a86da957449fc5b6 (diff)
downloadgdb-43b7e92b0c73d693d3b656b84b2a1181e40477ca.zip
gdb-43b7e92b0c73d693d3b656b84b2a1181e40477ca.tar.gz
gdb-43b7e92b0c73d693d3b656b84b2a1181e40477ca.tar.bz2
Add workaround from gdbserver's gdb_proc_service.h to GDB
This commit adds a workaround from gdbserver's gdb_proc_service.h to GDB's. It doesn't seem to have been needed on any glibc as far back as 2001, but it's possibly required for other C libraries so I've retained it. gdb/ChangeLog: * configure.ac: Check if sys/procfs.h defines elf_fpregset_t. (AC_CHECK_HEADERS): Check for linux/elf.h. * configure, config.in: Rebuild. * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h doesn't define elf_fpregset_t.
Diffstat (limited to 'gdb/gdb_proc_service.h')
-rw-r--r--gdb/gdb_proc_service.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/gdb_proc_service.h b/gdb/gdb_proc_service.h
index 39f0e03..ee9358d 100644
--- a/gdb/gdb_proc_service.h
+++ b/gdb/gdb_proc_service.h
@@ -64,6 +64,15 @@ EXTERN_C_POP
#include <sys/procfs.h>
#endif
+/* Not all platforms bring in <linux/elf.h> via <sys/procfs.h>. If
+ <sys/procfs.h> wasn't enough to find elf_fpregset_t, try the kernel
+ headers also (but don't if we don't need to). */
+#ifndef HAVE_ELF_FPREGSET_T
+# ifdef HAVE_LINUX_ELF_H
+# include <linux/elf.h>
+# endif
+#endif
+
EXTERN_C_PUSH
/* Functions in this interface return one of these status codes. */