1 /*- 2 * Copyright (c) 1984, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 * 7 * @(#)ptrace.h 8.2 (Berkeley) 01/04/94 8 */ 9 10 #ifndef _SYS_PTRACE_H_ 11 #define _SYS_PTRACE_H_ 12 13 #define PT_TRACE_ME 0 /* child declares it's being traced */ 14 #define PT_READ_I 1 /* read word in child's I space */ 15 #define PT_READ_D 2 /* read word in child's D space */ 16 #define PT_READ_U 3 /* read word in child's user structure */ 17 #define PT_WRITE_I 4 /* write word in child's I space */ 18 #define PT_WRITE_D 5 /* write word in child's D space */ 19 #define PT_WRITE_U 6 /* write word in child's user structure */ 20 #define PT_CONTINUE 7 /* continue the child */ 21 #define PT_KILL 8 /* kill the child process */ 22 #define PT_STEP 9 /* single step the child */ 23 #define PT_ATTACH 10 /* trace some running process */ 24 #define PT_DETACH 11 /* stop tracing a process */ 25 26 #define PT_FIRSTMACH 32 /* for machine-specific requests */ 27 #include <machine/ptrace.h> /* machine-specific requests, if any */ 28 29 #ifdef KERNEL 30 void proc_reparent __P((struct proc *child, struct proc *newparent)); 31 #else /* !KERNEL */ 32 33 #include <sys/cdefs.h> 34 35 __BEGIN_DECLS 36 int ptrace __P((int _request, pid_t _pid, caddr_t _addr, int _data)); 37 __END_DECLS 38 39 #endif /* !KERNEL */ 40 41 #endif /* !_SYS_PTRACE_H_ */ 42