1 /* $NetBSD: ptrace.h,v 1.11 2011/01/18 01:02:54 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 #define PT_MACHDEP_STRINGS \ 15 "PT_STEP", \ 16 "PT_GETREGS", "PT_SETREGS", \ 17 "PT_GETFPREGS", "PT_SETFPREGS", \ 18 "PT_GETVECREGS", "PT_SETVECREGS", 19 20 #ifdef _KERNEL 21 #ifdef _KERNEL_OPT 22 #include "opt_altivec.h" 23 #endif 24 25 #if defined(ALTIVEC) || defined(PPC_HAVE_SPE) 26 27 /* We have machine-dependent process tracing requests. */ 28 #define __HAVE_PTRACE_MACHDEP 29 30 #define PTRACE_MACHDEP_REQUEST_CASES \ 31 case PT_GETVECREGS: \ 32 case PT_SETVECREGS: 33 34 int ptrace_machdep_dorequest(struct lwp *, struct lwp *, int, void *, int); 35 int process_machdep_dovecregs(struct lwp *, struct lwp *, struct uio *); 36 int process_machdep_validvecregs(struct proc *); 37 38 /* We have machine-dependent procfs nodes. */ 39 #define __HAVE_PROCFS_MACHDEP 40 41 #define PROCFS_MACHDEP_NODE_TYPES \ 42 Pmachdep_vecregs, /* AltiVec register set */ 43 44 #define PROCFS_MACHDEP_NODETYPE_CASES \ 45 case Pmachdep_vecregs: 46 47 #define PROCFS_MACHDEP_PROTECT_CASES \ 48 case Pmachdep_vecregs: 49 50 #define PROCFS_MACHDEP_NODETYPE_DEFNS \ 51 { DT_REG, N("vecregs"), Pmachdep_vecregs, \ 52 procfs_machdep_validvecregs }, 53 54 /* Functions used by procfs. */ 55 struct mount; 56 struct pfsnode; 57 int procfs_machdep_dovecregs(struct lwp *, struct lwp *, 58 struct pfsnode *, struct uio *); 59 int procfs_machdep_validvecregs(struct lwp *, struct mount *); 60 61 #endif /* ALTIVEC || PPC_HAVE_SPE */ 62 #endif /* _KERNEL */ 63 64 #endif /* _POWERPC_PTRACE_H */ 65