diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2013-03-17 23:15:18 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2013-03-18 11:46:35 +0000 |
commit | ee348c60735e35730c3e95b89a4dd89bbcb4e7b5 (patch) | |
tree | cfa7126fabbec2547cf96f9ace61ea03d48ec312 /syscall.c | |
parent | 0482c5a21da75686960bfa3331c86051efdc99f5 (diff) | |
download | strace-ee348c60735e35730c3e95b89a4dd89bbcb4e7b5.tar.gz strace-ee348c60735e35730c3e95b89a4dd89bbcb4e7b5.tar.bz2 strace-ee348c60735e35730c3e95b89a4dd89bbcb4e7b5.tar.xz |
x32: use PTRACE_GETREGSET unconditionally
* syscall.c (get_regs) [X32]: Assume that PTRACE_GETREGSET always works
regardless of the kernel version.
Diffstat (limited to 'syscall.c')
-rw-r--r-- | syscall.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1005,7 +1005,12 @@ get_regs(pid_t pid) get_regs_error = ptrace(PTRACE_GETREGS, pid, NULL, &avr32_regs); # elif defined(I386) get_regs_error = ptrace(PTRACE_GETREGS, pid, NULL, (long) &i386_regs); -# elif defined(X86_64) || defined(X32) +# elif defined(X32) + /* x86_io.iov_base = &x86_regs_union; - already is */ + x86_io.iov_len = sizeof(x86_regs_union); + get_regs_error = ptrace(PTRACE_GETREGSET, pid, + NT_PRSTATUS, (long) &x86_io); +# elif defined(X86_64) /* * PTRACE_GETREGSET was introduced in 2.6.33. * Let's be paranoid and require a bit later kernel. |