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.
This commit is contained in:
Gary Benson
2018-10-01 10:37:39 +01:00
parent 3795e81442
commit 43b7e92b0c
5 changed files with 63 additions and 2 deletions

View File

@@ -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. */