Macros PTRACE_GETREGSET and PTRACE_SETREGSET are defined locally in
some places in GDB and GDBserver. This patch is to move them to
nat/linux-ptrace.h to avoid duplication.
gdb:
2015-06-01 Yao Qi <yao.qi@linaro.org>
* amd64-linux-nat.c: Include "nat/linux-ptrace.h".
* i386-linux-nat.c: Likewise.
* nat/linux-ptrace.h (PTRACE_GETREGSET, PTRACE_SETREGSET): Define.
* s390-linux-nat.c: Include "nat/linux-ptrace.h".
(PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
* x86-linux-nat.c: Include "nat/linux-ptrace.h".
* x86-linux-nat.h (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
gdb/gdbserver:
2015-06-01 Yao Qi <yao.qi@linaro.org>
* linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
* linux-x86-low.c: Likewise.
+2015-06-01 Yao Qi <yao.qi@linaro.org>
+
+ * amd64-linux-nat.c: Include "nat/linux-ptrace.h".
+ * i386-linux-nat.c: Likewise.
+ * nat/linux-ptrace.h (PTRACE_GETREGSET, PTRACE_SETREGSET): Define.
+ * s390-linux-nat.c: Include "nat/linux-ptrace.h".
+ (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
+ * x86-linux-nat.c: Include "nat/linux-ptrace.h".
+ * x86-linux-nat.h (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
+
2015-05-30 Eli Zaretskii <eliz@gnu.org>
* go32-nat.c (go32_xfer_memory): Fix the return value to be
2015-05-30 Eli Zaretskii <eliz@gnu.org>
* go32-nat.c (go32_xfer_memory): Fix the return value to be
#include "x86-xstate.h"
#include "x86-linux-nat.h"
#include "x86-xstate.h"
#include "x86-linux-nat.h"
+#include "nat/linux-ptrace.h"
/* Mapping between the general-purpose registers in GNU/Linux x86-64
`struct user' format and GDB's register cache layout for GNU/Linux
/* Mapping between the general-purpose registers in GNU/Linux x86-64
`struct user' format and GDB's register cache layout for GNU/Linux
+2015-06-01 Yao Qi <yao.qi@linaro.org>
+
+ * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
+ * linux-x86-low.c: Likewise.
+
2015-05-28 Don Breazeal <donb@codesourcery.com>
* linux-low.c (handle_extended_wait): Initialize
2015-05-28 Don Breazeal <donb@codesourcery.com>
* linux-low.c (handle_extended_wait): Initialize
#define HWCAP_S390_VX 2048
#endif
#define HWCAP_S390_VX 2048
#endif
-#ifndef PTRACE_GETREGSET
-#define PTRACE_GETREGSET 0x4204
-#endif
-
-#ifndef PTRACE_SETREGSET
-#define PTRACE_SETREGSET 0x4205
-#endif
-
/* Defined in auto-generated file s390-linux32.c. */
void init_registers_s390_linux32 (void);
extern const struct target_desc *tdesc_s390_linux32;
/* Defined in auto-generated file s390-linux32.c. */
void init_registers_s390_linux32 (void);
extern const struct target_desc *tdesc_s390_linux32;
#include <sys/ptrace.h>
#include <sys/uio.h>
#include <sys/ptrace.h>
#include <sys/uio.h>
-#ifndef PTRACE_GETREGSET
-#define PTRACE_GETREGSET 0x4204
-#endif
-
-#ifndef PTRACE_SETREGSET
-#define PTRACE_SETREGSET 0x4205
-#endif
-
-
#ifndef PTRACE_GET_THREAD_AREA
#define PTRACE_GET_THREAD_AREA 25
#endif
#ifndef PTRACE_GET_THREAD_AREA
#define PTRACE_GET_THREAD_AREA 25
#endif
#include "x86-xstate.h"
#include "x86-linux-nat.h"
#include "x86-xstate.h"
#include "x86-linux-nat.h"
+#include "nat/linux-ptrace.h"
/* The register sets used in GNU/Linux ELF core-dumps are identical to
the register sets in `struct user' that is used for a.out
/* The register sets used in GNU/Linux ELF core-dumps are identical to
the register sets in `struct user' that is used for a.out
# define PTRACE_SETSIGINFO 0x4203
#endif /* PTRACE_GETSIGINF */
# define PTRACE_SETSIGINFO 0x4203
#endif /* PTRACE_GETSIGINF */
+#ifndef PTRACE_GETREGSET
+#define PTRACE_GETREGSET 0x4204
+#endif
+
+#ifndef PTRACE_SETREGSET
+#define PTRACE_SETREGSET 0x4205
+#endif
+
/* If the system headers did not provide the constants, hard-code the normal
values. */
#ifndef PTRACE_EVENT_FORK
/* If the system headers did not provide the constants, hard-code the normal
values. */
#ifndef PTRACE_EVENT_FORK
#include "auxv.h"
#include "gregset.h"
#include "regset.h"
#include "auxv.h"
#include "gregset.h"
#include "regset.h"
+#include "nat/linux-ptrace.h"
#include "s390-linux-tdep.h"
#include "elf/common.h"
#include "s390-linux-tdep.h"
#include "elf/common.h"
#include <sys/ucontext.h>
#include <elf.h>
#include <sys/ucontext.h>
#include <elf.h>
-#ifndef PTRACE_GETREGSET
-#define PTRACE_GETREGSET 0x4204
-#endif
-
-#ifndef PTRACE_SETREGSET
-#define PTRACE_SETREGSET 0x4205
-#endif
-
/* Per-thread arch-specific data. */
struct arch_lwp_info
/* Per-thread arch-specific data. */
struct arch_lwp_info
#include "nat/linux-nat.h"
#include "nat/x86-linux.h"
#include "nat/x86-linux-dregs.h"
#include "nat/linux-nat.h"
#include "nat/x86-linux.h"
#include "nat/x86-linux-dregs.h"
+#include "nat/linux-ptrace.h"
/* Per-thread arch-specific data we want to keep. */
/* Per-thread arch-specific data we want to keep. */
#ifndef X86_LINUX_NAT_H
#define X86_LINUX_NAT_H 1
#ifndef X86_LINUX_NAT_H
#define X86_LINUX_NAT_H 1
-#ifndef PTRACE_GETREGSET
-#define PTRACE_GETREGSET 0x4204
-#endif
-
-#ifndef PTRACE_SETREGSET
-#define PTRACE_SETREGSET 0x4205
-#endif
-
/* Does the current host support PTRACE_GETREGSET? */
extern int have_ptrace_getregset;
\f
/* Does the current host support PTRACE_GETREGSET? */
extern int have_ptrace_getregset;
\f