summaryrefslogtreecommitdiff
path: root/gdb/configure.ac
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-06-26 14:42:55 +0000
committerH.J. Lu <hjl.tools@gmail.com>2012-06-26 14:42:55 +0000
commit7e6a660069efaf133026626fec54c99ae3e1804a (patch)
tree854bf78aeb4828f54880702e4d18684d5be59441 /gdb/configure.ac
parentdbe56c985fd842f670cf1e763ea3ffa002a19f82 (diff)
downloadgdb-7e6a660069efaf133026626fec54c99ae3e1804a.tar.gz
Use PTRACE_PEEKUSER to get fs_base/gs_base
* amd64-linux-nat.c: Include <sys/user.h>. (ps_get_thread_area): Use PTRACE_PEEKUSER to get fs_base/gs_base if HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE or HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE is defined. * configure.ac: Check if the fs_base and gs_base members of `struct user_regs_struct' exist. * config.in: Regenerated. * configure: Likewise.
Diffstat (limited to 'gdb/configure.ac')
-rw-r--r--gdb/configure.ac6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/configure.ac b/gdb/configure.ac
index f77aa854111..d52bd15d33d 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1274,6 +1274,12 @@ fi
AC_CHECK_MEMBERS([struct reg.r_fs, struct reg.r_gs], [], [],
[#include <machine/reg.h>])
+# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
+# Older amd64 Linux's don't have the fs_base and gs_base members of
+# `struct user_regs_struct'.
+AC_CHECK_MEMBERS([struct user_regs_struct.fs_base, struct user_regs_struct.gs_base],
+ [], [], [#include <sys/user.h>])
+
# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
AC_MSG_CHECKING(for PTRACE_GETREGS)
AC_CACHE_VAL(gdb_cv_have_ptrace_getregs,