xref: /openbsd-src/gnu/usr.bin/binutils/gdb/vx-share/ptrace.h (revision e93f7393d476ad1c5192174ea92f14ecc97182e7)
1*e93f7393Sniklas /*	@(#)ptrace.h 1.1 86/07/07 SMI	*/
2*e93f7393Sniklas 
3*e93f7393Sniklas /*
4*e93f7393Sniklas  * Copyright (c) 1985 by Sun Microsystems, Inc.
5*e93f7393Sniklas  */
6*e93f7393Sniklas 
7*e93f7393Sniklas /*
8*e93f7393Sniklas modification history
9*e93f7393Sniklas --------------------
10*e93f7393Sniklas 01a,05jun90,llk  borrowed.
11*e93f7393Sniklas */
12*e93f7393Sniklas 
13*e93f7393Sniklas #ifndef _PTRACE_
14*e93f7393Sniklas #define _PTRACE_
15*e93f7393Sniklas 
16*e93f7393Sniklas /*
17*e93f7393Sniklas  * Request values for the ptrace system call
18*e93f7393Sniklas  */
19*e93f7393Sniklas enum ptracereq {
20*e93f7393Sniklas 	PTRACE_TRACEME = 0,		/* 0, by tracee to begin tracing */
21*e93f7393Sniklas 	PTRACE_CHILDDONE = 0,		/* 0, tracee is done with his half */
22*e93f7393Sniklas 	PTRACE_PEEKTEXT,		/* 1, read word from text segment */
23*e93f7393Sniklas 	PTRACE_PEEKDATA,		/* 2, read word from data segment */
24*e93f7393Sniklas 	PTRACE_PEEKUSER,		/* 3, read word from user struct */
25*e93f7393Sniklas 	PTRACE_POKETEXT,		/* 4, write word into text segment */
26*e93f7393Sniklas 	PTRACE_POKEDATA,		/* 5, write word into data segment */
27*e93f7393Sniklas 	PTRACE_POKEUSER,		/* 6, write word into user struct */
28*e93f7393Sniklas 	PTRACE_CONT,			/* 7, continue process */
29*e93f7393Sniklas 	PTRACE_KILL,			/* 8, terminate process */
30*e93f7393Sniklas 	PTRACE_SINGLESTEP,		/* 9, single step process */
31*e93f7393Sniklas 	PTRACE_ATTACH,			/* 10, attach to an existing process */
32*e93f7393Sniklas 	PTRACE_DETACH,			/* 11, detach from a process */
33*e93f7393Sniklas 	PTRACE_GETREGS,			/* 12, get all registers */
34*e93f7393Sniklas 	PTRACE_SETREGS,			/* 13, set all registers */
35*e93f7393Sniklas 	PTRACE_GETFPREGS,		/* 14, get all floating point regs */
36*e93f7393Sniklas 	PTRACE_SETFPREGS,		/* 15, set all floating point regs */
37*e93f7393Sniklas 	PTRACE_READDATA,		/* 16, read data segment */
38*e93f7393Sniklas 	PTRACE_WRITEDATA,		/* 17, write data segment */
39*e93f7393Sniklas 	PTRACE_READTEXT,		/* 18, read text segment */
40*e93f7393Sniklas 	PTRACE_WRITETEXT,		/* 19, write text segment */
41*e93f7393Sniklas 	PTRACE_GETFPAREGS,		/* 20, get all fpa regs */
42*e93f7393Sniklas 	PTRACE_SETFPAREGS		/* 21, set all fpa regs */
43*e93f7393Sniklas };
44*e93f7393Sniklas #endif !_PTRACE
45