From ca9b78ce906d588bb9aab0c6739c2dbdacd62612 Mon Sep 17 00:00:00 2001 From: Yao Qi Date: Mon, 1 Jun 2015 12:13:02 +0100 Subject: Move PTRACE_GETREGSET and PTRACE_SETREGSET to nat/linux-ptrace.h 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 * 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 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove. * linux-x86-low.c: Likewise. --- gdb/nat/linux-ptrace.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gdb/nat') diff --git a/gdb/nat/linux-ptrace.h b/gdb/nat/linux-ptrace.h index 1db0cde..be6c395 100644 --- a/gdb/nat/linux-ptrace.h +++ b/gdb/nat/linux-ptrace.h @@ -43,6 +43,14 @@ struct buffer; # 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 -- cgit v1.1