From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20032 invoked by alias); 19 Jan 2014 07:53:38 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 20021 invoked by uid 89); 19 Jan 2014 07:53:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: mx.tkos.co.il Received: from guitar.tcltek.co.il (HELO mx.tkos.co.il) (192.115.133.116) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 19 Jan 2014 07:53:35 +0000 Received: from sapphire.tkos.co.il (unknown [10.0.4.3]) by mx.tkos.co.il (Postfix) with ESMTPA id 0B7B5440A80; Sun, 19 Jan 2014 09:53:32 +0200 (IST) From: Baruch Siach To: gdb-patches@sourceware.org Cc: Pedro Alves , Maxim Grigoriev , Marc Gauthier , Dror Maydan , Woody LaRue , Chris Zankel , Baruch Siach Subject: [PATCH v2] gdb: xtensa: fix linux ptrace includes Date: Sun, 19 Jan 2014 07:53:00 -0000 Message-Id: X-IsSubscribed: yes X-SW-Source: 2014-01/txt/msg00710.txt.bz2 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: add #include asm/ptrace.h. gdb/gdbserver/ * linux-xtensa-low.c: #include asm/ptrace.h instead of sys/ptrace.h. --- gdb/gdbserver/linux-xtensa-low.c | 2 +- gdb/xtensa-linux-nat.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gdb/gdbserver/linux-xtensa-low.c b/gdb/gdbserver/linux-xtensa-low.c index 7db97a9..479b65b 100644 --- a/gdb/gdbserver/linux-xtensa-low.c +++ b/gdb/gdbserver/linux-xtensa-low.c @@ -24,7 +24,7 @@ void init_registers_xtensa (void); extern const struct target_desc *tdesc_xtensa; -#include +#include #include #include "xtensa-xtregs.c" diff --git a/gdb/xtensa-linux-nat.c b/gdb/xtensa-linux-nat.c index 2372e79..9340c62 100644 --- a/gdb/xtensa-linux-nat.c +++ b/gdb/xtensa-linux-nat.c @@ -36,6 +36,7 @@ #include #include #include +#include #include "gregset.h" #include "xtensa-tdep.h" -- 1.8.5.2