* ppc-linux-nat.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Define.
(have_ptrace_getvrregs): Define for run time checks.
(gdb_vrregset_t): New type for Altivec register handling.
(fetch_register, store_register): Fetch/store altivec register
when needed.
(fetch_altivec_register, store_altivec_register): New functions.
(supply_vrregset, fill_vrregset): New functions.
(fetch_altivec_registers, store_altivec_registers): New functions.
(fetch_ppc_registers, store_ppc_registers): Fetch/store altivec
registers as well.
* ppc-linux-nat.c: Update copyright.
(fetch_register, store_register): Add tid parameter, don't compute
tid here.
(fetch_ppc_registers, store_ppc_registers): Add tid
parameter. Pass it along to callees.
(fetch_inferior_registers, store_inferior_registers): Compute tid
here, and pass it to calleed functions.
(fill_gregset, supply_fpregset): Clean up formatting.
* ppc-linux-nat.c (ppc_register_u_addr, supply_gregset,
fill_gregset): Call gdbarch_tdep() just once, assign result to
variable and use that, instead of calling the function several
times.
* ppc-linux-nat.c (ppc_ptrace_cannot_fetch_store_register):
New function.
(fetch_register): New function.
(fetch_ppc_registers): New function.
(fetch_inferior_registers): New function.
(store_register): New function.
(store_ppc_registers): New function.
(store_inferior_registers): New function.
(ppc_register_u_addr): Eliminate ustart parameter and its
uses. Make static.
(PT_READ_U, PT_WRITE_U, PTRACE_XFER_TYPE): Define if needed.
Include sys/ptrace.h.
* config/powerpc/nm-linux.h (FETCH_INFERIOR_REGISTERS): Define.
(U_REGS_OFFSET, REGISTER_U_ADDR): Delete.
* config/powerpc/linux.mh (NATDEPFILES): Delete core-aout.o.
* gregset.h: New file. Typedefs for gdb_gregset_t and
gdb_fpregset_t, prototypes for supply_gregset and friends.
* procfs.c: Include gregset.h. Delete local prototypes for
supply_gregset etc., and local typedef gdb_gregset_t etc.
* sol-thread.c: Include gregset.h, delete local prototypes,
add appropriate casts to gdb_gregset_t.
* uw-thread.c, lin-thread.c, core-sol2.c, core-regset.c,
sparc-tdep.c, ptx4-nat.c, ppc-linux-nat.c, mipsv4-nat.c,
m88k-nat.c, m68klinux-nat.c, m68k-tdep.c, irix5-nat.c,
irix4-nat.c, ia64-linux-nat.c, i386v4-nat.c, cxux-nat.c,
arm-linux-nat.c, alpha-nat.c: Include gregset.h.
* config/nm-linux.h: Define GDB_GREGSET_T, GDB_FPREGET_T.
* config/sparc/tm-sun4sol2.h: Ditto.