1 /* $NetBSD: ptrace.h,v 1.5 2003/03/05 05:27:25 matt Exp $ */ 2 3 #ifndef _POWERPC_PTRACE_H 4 #define _POWERPC_PTRACE_H 5 6 #define PT_STEP (PT_FIRSTMACH + 0) 7 #define PT_GETREGS (PT_FIRSTMACH + 1) 8 #define PT_SETREGS (PT_FIRSTMACH + 2) 9 #define PT_GETFPREGS (PT_FIRSTMACH + 3) 10 #define PT_SETFPREGS (PT_FIRSTMACH + 4) 11 #define PT_GETVECREGS (PT_FIRSTMACH + 5) 12 #define PT_SETVECREGS (PT_FIRSTMACH + 6) 13 14 #ifdef _KERNEL 15 #ifdef _KERNEL_OPT 16 #include "opt_altivec.h" 17 #endif 18 19 #ifdef ALTIVEC 20 21 /* We have machine-dependent process tracing requests. */ 22 #define __HAVE_PTRACE_MACHDEP 23 24 #define PTRACE_MACHDEP_REQUEST_CASES \ 25 case PT_GETVECREGS: \ 26 case PT_SETVECREGS: 27 28 int ptrace_machdep_dorequest(struct proc *, struct lwp *, int, caddr_t, int); 29 int process_machdep_dovecregs(struct proc *, struct lwp *, struct uio *); 30 int process_machdep_validvecregs(struct proc *); 31 32 /* We have machine-dependent procfs nodes. */ 33 #define __HAVE_PROCFS_MACHDEP 34 35 #define PROCFS_MACHDEP_NODE_TYPES \ 36 Pmachdep_vecregs, /* AltiVec register set */ 37 38 #define PROCFS_MACHDEP_NODETYPE_CASES \ 39 case Pmachdep_vecregs: 40 41 #define PROCFS_MACHDEP_PROTECT_CASES \ 42 case Pmachdep_vecregs: 43 44 #define PROCFS_MACHDEP_NODETYPE_DEFNS \ 45 { DT_REG, N("vecregs"), Pmachdep_vecregs, \ 46 procfs_machdep_validvecregs }, 47 48 /* Functions used by procfs. */ 49 struct mount; 50 struct pfsnode; 51 int procfs_machdep_dovecregs(struct proc *, struct lwp *, 52 struct pfsnode *, struct uio *); 53 int procfs_machdep_validvecregs(struct proc *, struct mount *); 54 55 #endif /* ALTIVEC */ 56 #endif /* _KERNEL */ 57 58 #endif /* _POWERPC_PTRACE_H */ 59