]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: xtensa: fix linux ptrace includes
authorBaruch Siach <baruch@tkos.co.il>
Wed, 22 Jan 2014 12:22:26 +0000 (12:22 +0000)
committerPedro Alves <palves@redhat.com>
Wed, 22 Jan 2014 12:22:26 +0000 (12:22 +0000)
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.

gdb/ChangeLog
gdb/gdbserver/ChangeLog
gdb/gdbserver/linux-xtensa-low.c
gdb/xtensa-linux-nat.c

index 6a2f95763bcef4ad084080148a42f296ebbd7ac3..c29fa6fd8a4cc0f94b259486ecdeea37c8d65b77 100644 (file)
@@ -1,3 +1,7 @@
+2014-01-22  Baruch Siach  <baruch@tkos.co.il>
+
+       * xtensa-linux-nat.c: Include asm/ptrace.h.
+
 2013-12-16  Pedro Alves  <palves@redhat.com>
 
        PR 16329
index 514bbcb68d2745d61c00c5a891e88b9081db78f6..7078404e7fec2adfad810896ec89b5843fd307fa 100644 (file)
@@ -1,3 +1,8 @@
+2014-01-22  Baruch Siach  <baruch@tkos.co.il>
+
+       * linux-xtensa-low.c: Include asm/ptrace.h instead of
+       sys/ptrace.h.
+
 2013-09-16  Will Newton  <will.newton@linaro.org>
 
        * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
index d988a465bb168d4cac7212c850c2028b387386e8..194530e7c33a765908d71eeebbc9b2c28cbd2735 100644 (file)
@@ -23,7 +23,7 @@
 /* Defined in auto-generated file reg-xtensa.c.  */
 void init_registers_xtensa (void);
 
-#include <sys/ptrace.h>
+#include <asm/ptrace.h>
 #include <xtensa-config.h>
 
 #include "xtensa-xtregs.c"
index 2ca71440dcd1ef5e395b7fe9cf3102699afd048a..8c536185e919c17f466ff8ad11fea96e673e376f 100644 (file)
@@ -37,6 +37,7 @@
 #include <fcntl.h>
 #include <sys/procfs.h>
 #include <sys/ptrace.h>
+#include <asm/ptrace.h>
 
 #include "gregset.h"
 #include "xtensa-tdep.h"