diff options
author | Yao Qi <yao@codesourcery.com> | 2015-01-08 17:23:55 +0800 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2015-01-14 22:28:22 +0800 |
commit | 514c533895543e246eea1771ea67f3c3486006a4 (patch) | |
tree | 447475bf357a9626dfa79d3dfbafd2a5c4b6d067 /gdb/gdbserver/linux-ppc-low.c | |
parent | 5589af0e6661abe07e9a997f6324988b4b87c72f (diff) | |
download | gdb-514c533895543e246eea1771ea67f3c3486006a4.zip gdb-514c533895543e246eea1771ea67f3c3486006a4.tar.gz gdb-514c533895543e246eea1771ea67f3c3486006a4.tar.bz2 |
Move some ppc macros to nat/ppc-linux.h
When I use PPC_FEATURE_BOOKE in GDBserver, I find it is defined in GDB
but not in GDBserver. After taking a further look, I find some macros
are duplicated between ppc-linux-nat.c and linux-ppc-low.c, so this
patch is to move them into nat/ppc-linux.h.
gdb/gdbserver:
2015-01-14 Yao Qi <yao@codesourcery.com>
* linux-ppc-low.c: Include "nat/ppc-linux.h".
(PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
(PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
(PT_ORIG_R3, PT_TRAP): Likewise.
(PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
(PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
(PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
gdb:
2015-01-14 Yao Qi <yao@codesourcery.com>
* ppc-linux-nat.c (PT_ORIG_R3, PT_TRAP): Move to
nat/ppc-linux.h.
(PPC_FEATURE_CELL, PPC_FEATURE_BOOKE): Likewise.
(PPC_FEATURE_HAS_DFP): Likewise.
(PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
(PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
(PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
Include "nat/ppc-linux.h".
* nat/ppc-linux.h: New file.
* Makefile.in (HFILES_NO_SRCDIR): Add nat/ppc-linux.h.
Diffstat (limited to 'gdb/gdbserver/linux-ppc-low.c')
-rw-r--r-- | gdb/gdbserver/linux-ppc-low.c | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c index 697fa6c..6e880c1 100644 --- a/gdb/gdbserver/linux-ppc-low.c +++ b/gdb/gdbserver/linux-ppc-low.c @@ -23,12 +23,7 @@ #include <elf.h> #include <asm/ptrace.h> -/* These are in <asm/cputable.h> in current kernels. */ -#define PPC_FEATURE_HAS_VSX 0x00000080 -#define PPC_FEATURE_HAS_ALTIVEC 0x10000000 -#define PPC_FEATURE_HAS_SPE 0x00800000 -#define PPC_FEATURE_CELL 0x00010000 -#define PPC_FEATURE_HAS_DFP 0x00000400 +#include "nat/ppc-linux.h" static unsigned long ppc_hwcap; @@ -95,14 +90,6 @@ extern const struct target_desc *tdesc_powerpc_isa205_vsx64l; #define ppc_num_regs 73 -/* This sometimes isn't defined. */ -#ifndef PT_ORIG_R3 -#define PT_ORIG_R3 34 -#endif -#ifndef PT_TRAP -#define PT_TRAP 40 -#endif - #ifdef __powerpc64__ /* We use a constant for FPSCR instead of PT_FPSCR, because many shipped PPC64 kernels had the wrong value in ptrace.h. */ @@ -544,11 +531,6 @@ static void ppc_fill_gregset (struct regcache *regcache, void *buf) ppc_collect_ptrace_register (regcache, i, (char *) buf + ppc_regmap[i]); } -#ifndef PTRACE_GETVSXREGS -#define PTRACE_GETVSXREGS 27 -#define PTRACE_SETVSXREGS 28 -#endif - #define SIZEOF_VSXREGS 32*8 static void @@ -579,11 +561,6 @@ ppc_store_vsxregset (struct regcache *regcache, const void *buf) supply_register (regcache, base + i, ®set[i * 8]); } -#ifndef PTRACE_GETVRREGS -#define PTRACE_GETVRREGS 18 -#define PTRACE_SETVRREGS 19 -#endif - #define SIZEOF_VRREGS 33*16+4 static void @@ -620,11 +597,6 @@ ppc_store_vrregset (struct regcache *regcache, const void *buf) supply_register_by_name (regcache, "vrsave", ®set[33 * 16]); } -#ifndef PTRACE_GETEVRREGS -#define PTRACE_GETEVRREGS 20 -#define PTRACE_SETEVRREGS 21 -#endif - struct gdb_evrregset_t { unsigned long evr[32]; |