GNU Binutils with patches for OS216
修訂 | ce1f8608d5debf47bf2312b937abdaab5e4dcc4e (tree) |
---|---|
時間 | 2014-01-22 21:22:26 |
作者 | Baruch Siach <baruch@tkos...> |
Commiter | Pedro Alves |
gdb: xtensa: fix linux ptrace includes
Currently, xtensa code using the Linux ptrace interface only include
sys/ptrace.h. This file comes from the C library (glibc and uClibc,
at least), and includes a declaration of the ptrace() functions, along
with some cross architecture constants that are mostly copied from the
file located at include/uapi/linux/ptrace.h in recent Linux kernels.
For xtensa specific constants like PTRACE_GETXTREGS and
PTRACE_SETXTREGS the asm/ptrace.h include from the Linux kernel UAPI
is needed. The code in gdbserver xtensa specific part doesn't call
ptrace() directly, so we can remove the unneeded sys/ptrace.h include.
The gdb xtensa specific code needs both headers, since it calls
ptrace().
gdb/
* xtensa-linux-nat.c: Include asm/ptrace.h.
gdb/gdbserver/
* linux-xtensa-low.c: Include asm/ptrace.h instead of
sys/ptrace.h.
@@ -1,3 +1,7 @@ | ||
1 | +2014-01-22 Baruch Siach <baruch@tkos.co.il> | |
2 | + | |
3 | + * xtensa-linux-nat.c: Include asm/ptrace.h. | |
4 | + | |
1 | 5 | 2013-12-16 Pedro Alves <palves@redhat.com> |
2 | 6 | |
3 | 7 | PR 16329 |
@@ -1,3 +1,8 @@ | ||
1 | +2014-01-22 Baruch Siach <baruch@tkos.co.il> | |
2 | + | |
3 | + * linux-xtensa-low.c: Include asm/ptrace.h instead of | |
4 | + sys/ptrace.h. | |
5 | + | |
1 | 6 | 2013-09-16 Will Newton <will.newton@linaro.org> |
2 | 7 | |
3 | 8 | * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero |
@@ -23,7 +23,7 @@ | ||
23 | 23 | /* Defined in auto-generated file reg-xtensa.c. */ |
24 | 24 | void init_registers_xtensa (void); |
25 | 25 | |
26 | -#include <sys/ptrace.h> | |
26 | +#include <asm/ptrace.h> | |
27 | 27 | #include <xtensa-config.h> |
28 | 28 | |
29 | 29 | #include "xtensa-xtregs.c" |
@@ -37,6 +37,7 @@ | ||
37 | 37 | #include <fcntl.h> |
38 | 38 | #include <sys/procfs.h> |
39 | 39 | #include <sys/ptrace.h> |
40 | +#include <asm/ptrace.h> | |
40 | 41 | |
41 | 42 | #include "gregset.h" |
42 | 43 | #include "xtensa-tdep.h" |