• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

修訂ce1f8608d5debf47bf2312b937abdaab5e4dcc4e (tree)
時間2014-01-22 21:22:26
作者Baruch Siach <baruch@tkos...>
CommiterPedro Alves

Log Message

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.

Change Summary

差異

--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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+
15 2013-12-16 Pedro Alves <palves@redhat.com>
26
37 PR 16329
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -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+
16 2013-09-16 Will Newton <will.newton@linaro.org>
27
38 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
--- a/gdb/gdbserver/linux-xtensa-low.c
+++ b/gdb/gdbserver/linux-xtensa-low.c
@@ -23,7 +23,7 @@
2323 /* Defined in auto-generated file reg-xtensa.c. */
2424 void init_registers_xtensa (void);
2525
26-#include <sys/ptrace.h>
26+#include <asm/ptrace.h>
2727 #include <xtensa-config.h>
2828
2929 #include "xtensa-xtregs.c"
--- a/gdb/xtensa-linux-nat.c
+++ b/gdb/xtensa-linux-nat.c
@@ -37,6 +37,7 @@
3737 #include <fcntl.h>
3838 #include <sys/procfs.h>
3939 #include <sys/ptrace.h>
40+#include <asm/ptrace.h>
4041
4142 #include "gregset.h"
4243 #include "xtensa-tdep.h"