source: branches/libc-0.6/src/emx/include/sys/ptrace.h

Last change on this file was 18, checked in by bird, 22 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 1.9 KB
Line 
1/* sys/ptrace.h (emx+gcc) */
2
3#ifndef _SYS_PTRACE_H
4#define _SYS_PTRACE_H
5
6#if defined (__cplusplus)
7extern "C" {
8#endif
9
10#define PTRACE_TRACEME 0 /* not used by emx */
11#define PTRACE_PEEKTEXT 1
12#define PTRACE_PEEKDATA 2
13#define PTRACE_PEEKUSER 3
14#define PTRACE_POKETEXT 4
15#define PTRACE_POKEDATA 5
16#define PTRACE_POKEUSER 6
17#define PTRACE_RESUME 7
18#define PTRACE_EXIT 8
19#define PTRACE_STEP 9
20#define PTRACE_SESSION 10
21#define PTRACE_NOTIFICATION 11
22#define PTRACE_CONT 12
23#define PTRACE_THAW 13
24#define PTRACE_FREEZE 14
25#define PTRACE_ATTACH 15
26#define PTRACE_DETACH 16
27
28#define PTN_NONE 0
29#define PTN_THREAD_NEW 1
30#define PTN_THREAD_END 2
31#define PTN_MODULE_LOAD 3
32#define PTN_MODULE_FREE 4
33#define PTN_PROC_NEW 5
34
35#define PTNMOD_DLL 0x0001
36#define PTNMOD_AOUT 0x0002
37
38#define PTNPROC_FORK 0x0001
39#define PTNPROC_AOUT 0x0002
40
41#define PTRACE_GETPID(x) ((unsigned)(x) & 0xffff)
42#define PTRACE_GETTID(x) (((unsigned)(x) >> 16) & 0xffff)
43#define PTRACE_PIDTID(pid,tid) (((unsigned)(tid) << 16) | (unsigned)(pid))
44
45struct ptn_thread
46{
47 unsigned tid;
48 unsigned long reserved[31];
49};
50
51struct ptn_module
52{
53 unsigned long hmte;
54 unsigned long text_start;
55 unsigned long text_size;
56 unsigned long data_start;
57 unsigned long data_size;
58 unsigned long bss_start;
59 unsigned long bss_size;
60 unsigned long flags;
61 unsigned long reserved[24];
62 char name[260];
63};
64
65struct ptn_proc
66{
67 unsigned pid;
68 unsigned long flags;
69 unsigned long fork_addr;
70 unsigned long reserved[29];
71 char name[260];
72};
73
74union ptn_data
75{
76 struct ptn_thread thread;
77 struct ptn_module module;
78 struct ptn_proc proc;
79};
80
81int ptrace (int, int, int, int);
82
83#if defined (__cplusplus)
84}
85#endif
86
87#endif /* not _SYS_PTRACE_H */
Note: See TracBrowser for help on using the repository browser.