]> 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:18:29 +0000 (12:18 +0000)
committerPedro Alves <palves@redhat.com>
Wed, 22 Jan 2014 12:18:43 +0000 (12:18 +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 010f2922e0753919757ddec966d4eed23fcfb294..d1274d1b1b29cc7d37b97c2647a8d5e09dc5a5c1 100644 (file)
@@ -1,3 +1,7 @@
+2014-01-22  Baruch Siach  <baruch@tkos.co.il>
+
+       * xtensa-linux-nat.c: Include asm/ptrace.h.
+
 2014-01-21  Roland McGrath  <mcgrathr@google.com>
 
        * configure.ac: Call AM_PROG_INSTALL_STRIP.
index 27f182db1808d1f52b752662c610114006ff1e27..102d27000d1ec0feb2e9cb5109aa8bbd9f115422 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.
+
 2014-01-13  Eli Zaretskii  <eliz@gnu.org>
 
        * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
index 7db97a9cc543fef70dccccb52c1555b549a18753..479b65b26b0064ba8663d39ff9054c4a13ecc946 100644 (file)
@@ -24,7 +24,7 @@
 void init_registers_xtensa (void);
 extern const struct target_desc *tdesc_xtensa;
 
-#include <sys/ptrace.h>
+#include <asm/ptrace.h>
 #include <xtensa-config.h>
 
 #include "xtensa-xtregs.c"
index 2372e792f3fe21b66cc940d7f5797fdd32a54081..9340c62fe8585154e18e466887bfb3ae96f46589 100644 (file)
@@ -36,6 +36,7 @@
 #include <fcntl.h>
 #include <sys/procfs.h>
 #include <sys/ptrace.h>
+#include <asm/ptrace.h>
 
 #include "gregset.h"
 #include "xtensa-tdep.h"