Move some ppc macros to nat/ppc-linux.h
authorYao Qi <yao@codesourcery.com>
Thu, 8 Jan 2015 09:23:55 +0000 (17:23 +0800)
committerYao Qi <yao@codesourcery.com>
Wed, 14 Jan 2015 14:28:22 +0000 (22:28 +0800)
commit514c533895543e246eea1771ea67f3c3486006a4
tree447475bf357a9626dfa79d3dfbafd2a5c4b6d067
parent5589af0e6661abe07e9a997f6324988b4b87c72f
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.
gdb/ChangeLog
gdb/Makefile.in
gdb/gdbserver/ChangeLog
gdb/gdbserver/linux-ppc-low.c
gdb/nat/ppc-linux.h [new file with mode: 0644]
gdb/ppc-linux-nat.c