binutils-gdb/gdb/nat
Pedro Alves 40c31709c6 Fix PR gdb/20413 - x32: linux_ptrace_test_ret_to_nx: Cannot PTRACE_PEEKUSER
An x32 gdb always issues this warning:

 (gdb) start
 Temporary breakpoint 1 at 0x4043e9: file foo.c, line 25.
 Starting program: a.out
 warning: linux_ptrace_test_ret_to_nx: Cannot PTRACE_PEEKUSER: Input/output error

 Temporary breakpoint 1, main (argc=1, argv=0xffffd544) at foo.c:25
 25      {
 (gdb)

As described in Linux commit 55283e253771 (x32: Add ptrace for x32):

    [...] PTRACE_PEEKUSR and PTRACE_POKEUSR are only allowed to access
    segment and debug registers. [...]

The fix is to use PTRACE_GETREGS instead.

gdb/ChangeLog:
2016-07-26  Pedro Alves  <palves@redhat.com>

	* nat/linux-ptrace.c: Include "gregset.h".
	(linux_ptrace_test_ret_to_nx): Use PTRACE_GETREGS instead of
	PTRACE_PEEKUSER.
2016-07-26 19:38:13 +01:00
..
aarch64-linux-hw-point.c Fix ARMv8.1/v8.2 for hw watchpoint and breakpoint 2016-07-23 10:10:32 -07:00
aarch64-linux-hw-point.h Fix ARMv8.1/v8.2 for hw watchpoint and breakpoint 2016-07-23 10:10:32 -07:00
aarch64-linux.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
aarch64-linux.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
amd64-linux-siginfo.c Fix PR gdb/20287 - x32 and "gdb_static_assert (sizeof (nat_siginfo_t) == sizeof (siginfo_t))" 2016-07-26 19:35:40 +01:00
amd64-linux-siginfo.h Adaptation of siginfo fixup for the new bnd fields 2016-02-02 12:02:16 +01:00
gdb_ptrace.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
gdb_thread_db.h Remove unused libthread_db td_thr_validate reference 2016-05-23 13:26:47 +01:00
glibc_thread_db.h Move shared native target specific code to gdb/nat 2014-06-20 14:06:48 +01:00
linux-btrace.c Remove trademark acknowledgements throughout 2016-01-12 15:03:11 +00:00
linux-btrace.h Remove trademark acknowledgements throughout 2016-01-12 15:03:11 +00:00
linux-namespaces.c Fix gdbserver build failure on targets without fork 2016-01-18 11:39:42 +00:00
linux-namespaces.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
linux-nat.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
linux-osdata.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
linux-osdata.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
linux-personality.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
linux-personality.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
linux-procfs.c linux-procfs: Handle lowercase "t (tracing stop)" state 2016-07-25 12:58:38 +01:00
linux-procfs.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
linux-ptrace.c Fix PR gdb/20413 - x32: linux_ptrace_test_ret_to_nx: Cannot PTRACE_PEEKUSER 2016-07-26 19:38:13 +01:00
linux-ptrace.h MIPS/Linux: Also recognize TRAP_BRKPT and TRAP_HWBKPT 2016-04-15 23:52:00 +01:00
linux-waitpid.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
linux-waitpid.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
mips-linux-watch.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
mips-linux-watch.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
ppc-linux.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
ppc-linux.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
x86-cpuid.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
x86-dregs.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
x86-dregs.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
x86-gcc-cpuid.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
x86-linux-dregs.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
x86-linux-dregs.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
x86-linux.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
x86-linux.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00