Dr Andrew Scott G7VAV

My photo
 
April 2024
Mo Tu We Th Fr Sa Su
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 1 2 3 4 5
6 7 8 9 10 11 12


ptrace.h
001: /* `ptrace' debugger support interface.  Linux version.
002:    Copyright (C) 1996-1999,2000,2006,2007,2011 Free Software Foundation, Inc.
003:    This file is part of the GNU C Library.
004: 
005:    The GNU C Library is free software; you can redistribute it and/or
006:    modify it under the terms of the GNU Lesser General Public
007:    License as published by the Free Software Foundation; either
008:    version 2.1 of the License, or (at your option) any later version.
009: 
010:    The GNU C Library is distributed in the hope that it will be useful,
011:    but WITHOUT ANY WARRANTY; without even the implied warranty of
012:    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
013:    Lesser General Public License for more details.
014: 
015:    You should have received a copy of the GNU Lesser General Public
016:    License along with the GNU C Library; if not, write to the Free
017:    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
018:    02111-1307 USA.  */
019: 
020: #ifndef _SYS_PTRACE_H
021: #define _SYS_PTRACE_H   1
022: 
023: #include <features.h>
024: 
025: __BEGIN_DECLS
026: 
027: /* Type of the REQUEST argument to `ptrace.'  */
028: enum __ptrace_request
029: {
030:   /* Indicate that the process making this request should be traced.
031:      All signals received by this process can be intercepted by its
032:      parent, and its parent can use the other `ptrace' requests.  */
033:   PTRACE_TRACEME = 0,
034: #define PT_TRACE_ME PTRACE_TRACEME
035: 
036:   /* Return the word in the process's text space at address ADDR.  */
037:   PTRACE_PEEKTEXT = 1,
038: #define PT_READ_I PTRACE_PEEKTEXT
039: 
040:   /* Return the word in the process's data space at address ADDR.  */
041:   PTRACE_PEEKDATA = 2,
042: #define PT_READ_D PTRACE_PEEKDATA
043: 
044:   /* Return the word in the process's user area at offset ADDR.  */
045:   PTRACE_PEEKUSER = 3,
046: #define PT_READ_U PTRACE_PEEKUSER
047: 
048:   /* Write the word DATA into the process's text space at address ADDR.  */
049:   PTRACE_POKETEXT = 4,
050: #define PT_WRITE_I PTRACE_POKETEXT
051: 
052:   /* Write the word DATA into the process's data space at address ADDR.  */
053:   PTRACE_POKEDATA = 5,
054: #define PT_WRITE_D PTRACE_POKEDATA
055: 
056:   /* Write the word DATA into the process's user area at offset ADDR.  */
057:   PTRACE_POKEUSER = 6,
058: #define PT_WRITE_U PTRACE_POKEUSER
059: 
060:   /* Continue the process.  */
061:   PTRACE_CONT = 7,
062: #define PT_CONTINUE PTRACE_CONT
063: 
064:   /* Kill the process.  */
065:   PTRACE_KILL = 8,
066: #define PT_KILL PTRACE_KILL
067: 
068:   /* Single step the process.
069:      This is not supported on all machines.  */
070:   PTRACE_SINGLESTEP = 9,
071: #define PT_STEP PTRACE_SINGLESTEP
072: 
073:   /* Get all general purpose registers used by a processes.
074:      This is not supported on all machines.  */
075:    PTRACE_GETREGS = 12,
076: #define PT_GETREGS PTRACE_GETREGS
077: 
078:   /* Set all general purpose registers used by a processes.
079:      This is not supported on all machines.  */
080:    PTRACE_SETREGS = 13,
081: #define PT_SETREGS PTRACE_SETREGS
082: 
083:   /* Get all floating point registers used by a processes.
084:      This is not supported on all machines.  */
085:    PTRACE_GETFPREGS = 14,
086: #define PT_GETFPREGS PTRACE_GETFPREGS
087: 
088:   /* Set all floating point registers used by a processes.
089:      This is not supported on all machines.  */
090:    PTRACE_SETFPREGS = 15,
091: #define PT_SETFPREGS PTRACE_SETFPREGS
092: 
093:   /* Attach to a process that is already running. */
094:   PTRACE_ATTACH = 16,
095: #define PT_ATTACH PTRACE_ATTACH
096: 
097:   /* Detach from a process attached to with PTRACE_ATTACH.  */
098:   PTRACE_DETACH = 17,
099: #define PT_DETACH PTRACE_DETACH
100: 
101:   /* Get all extended floating point registers used by a processes.
102:      This is not supported on all machines.  */
103:    PTRACE_GETFPXREGS = 18,
104: #define PT_GETFPXREGS PTRACE_GETFPXREGS
105: 
106:   /* Set all extended floating point registers used by a processes.
107:      This is not supported on all machines.  */
108:    PTRACE_SETFPXREGS = 19,
109: #define PT_SETFPXREGS PTRACE_SETFPXREGS
110: 
111:   /* Continue and stop at the next (return from) syscall.  */
112:   PTRACE_SYSCALL = 24,
113: #define PT_SYSCALL PTRACE_SYSCALL
114: 
115:   /* Set ptrace filter options.  */
116:   PTRACE_SETOPTIONS = 0x4200,
117: #define PT_SETOPTIONS PTRACE_SETOPTIONS
118: 
119:   /* Get last ptrace message.  */
120:   PTRACE_GETEVENTMSG = 0x4201,
121: #define PT_GETEVENTMSG PTRACE_GETEVENTMSG
122: 
123:   /* Get siginfo for process.  */
124:   PTRACE_GETSIGINFO = 0x4202,
125: #define PT_GETSIGINFO PTRACE_GETSIGINFO
126: 
127:   /* Set new siginfo for process.  */
128:   PTRACE_SETSIGINFO = 0x4203,
129: #define PT_SETSIGINFO PTRACE_SETSIGINFO
130: 
131:   /* Get register content.  */
132:   PTRACE_GETREGSET = 0x4204,
133: #define PTRACE_GETREGSET PTRACE_GETREGSET
134: 
135:   /* Set register content.  */
136:   PTRACE_SETREGSET = 0x4205,
137: #define PTRACE_SETREGSET PTRACE_SETREGSET
138: 
139:   /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect
140:      signal or group stop state.  */
141:   PTRACE_SEIZE = 0x4206,
142: #define PTRACE_SEIZE PTRACE_SEIZE
143: 
144:   /* Trap seized tracee.  */
145:   PTRACE_INTERRUPT = 0x4207,
146: #define PTRACE_INTERRUPT PTRACE_INTERRUPT
147: 
148:   /* Wait for next group event.  */
149:   PTRACE_LISTEN = 0x4208
150: };
151: 
152: 
153: /* Flag for PTRACE_LISTEN.  */
154: enum __ptrace_flags
155: {
156:   PTRACE_SEIZE_DEVEL = 0x80000000
157: };
158: 
159: /* Options set using PTRACE_SETOPTIONS.  */
160: enum __ptrace_setoptions
161: {
162:   PTRACE_O_TRACESYSGOOD = 0x00000001,
163:   PTRACE_O_TRACEFORK    = 0x00000002,
164:   PTRACE_O_TRACEVFORK   = 0x00000004,
165:   PTRACE_O_TRACECLONE   = 0x00000008,
166:   PTRACE_O_TRACEEXEC    = 0x00000010,
167:   PTRACE_O_TRACEVFORKDONE = 0x00000020,
168:   PTRACE_O_TRACEEXIT    = 0x00000040,
169:   PTRACE_O_MASK         = 0x0000007f
170: };
171: 
172: /* Wait extended result codes for the above trace options.  */
173: enum __ptrace_eventcodes
174: {
175:   PTRACE_EVENT_FORK     = 1,
176:   PTRACE_EVENT_VFORK    = 2,
177:   PTRACE_EVENT_CLONE    = 3,
178:   PTRACE_EVENT_EXEC     = 4,
179:   PTRACE_EVENT_VFORK_DONE = 5,
180:   PTRACE_EVENT_EXIT     = 6
181: };
182: 
183: /* Perform process tracing functions.  REQUEST is one of the values
184:    above, and determines the action to be taken.
185:    For all requests except PTRACE_TRACEME, PID specifies the process to be
186:    traced.
187: 
188:    PID and the other arguments described above for the various requests should
189:    appear (those that are used for the particular request) as:
190:      pid_t PID, void *ADDR, int DATA, void *ADDR2
191:    after REQUEST.  */
192: extern long int ptrace (enum __ptrace_request __request, ...) __THROW;
193: 
194: __END_DECLS
195: 
196: #endif /* _SYS_PTRACE_H */
197: 


for client 18.222.155.58
© Andrew Scott 2006 - 2024,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/