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.
This commit is contained in:
parent
fa72205cb9
commit
e671835b7a
|
@ -1,3 +1,7 @@
|
|||
2014-01-20 Baruch Siach <baruch@tkos.co.il>
|
||||
|
||||
* xtensa-linux-nat.c: Include asm/ptrace.h.
|
||||
|
||||
2014-01-17 Iain Buclaw <ibuclaw@gdcproject.org>
|
||||
|
||||
* Makefile.in (SFILES): Add d-support.c.
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2014-01-20 Baruch Siach <baruch@tkos.co.il>
|
||||
|
||||
* linux-xtensa-low.c: Include asm/ptrace.h instead of
|
||||
sys/ptrace.h.
|
||||
|
||||
2014-01-17 Pedro Alves <palves@redhat.com>
|
||||
|
||||
PR build/16445
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue