]>
Commit | Line | Data |
---|---|---|
1 | 2006-09-17 Mike Frysinger <vapier@gentoo.org> | |
2 | ||
3 | * sysdeps/unix/sysv/linux/sys/ptrace.h [PTRACE_SETOPTIONS, | |
4 | PTRACE_GETEVENTMSG, PTRACE_GETSIGINFO, PTRACE_SETSIGINFO]: Define. | |
5 | * sysdeps/unix/sysv/linux/ptrace.c [PTRACE_SETOPTIONS, | |
6 | PTRACE_GETEVENTMSG, PTRACE_GETSIGINFO, PTRACE_SETSIGINFO]: Check. | |
7 | ||
8 | --- libc/sysdeps/unix/sysv/linux/ptrace.c | |
9 | +++ libc/sysdeps/unix/sysv/linux/ptrace.c | |
10 | @@ -1,4 +1,4 @@ | |
11 | -/* Copyright (C) 1995,1996,1997,1998,2000,2003 Free Software Foundation, Inc. | |
12 | +/* Copyright (C) 1995-1998,2000,2003,2006 Free Software Foundation, Inc. | |
13 | This file is part of the GNU C Library. | |
14 | ||
15 | The GNU C Library is free software; you can redistribute it and/or | |
16 | @@ -21,6 +21,7 @@ | |
17 | #include <sys/ptrace.h> | |
18 | #include <sys/user.h> | |
19 | #include <stdarg.h> | |
20 | +#include <signal.h> | |
21 | ||
22 | #include <sysdep.h> | |
23 | #include <sys/syscall.h> | |
24 | @@ -89,6 +90,19 @@ ptrace (enum __ptrace_request request, . | |
25 | #endif | |
26 | break; | |
27 | ||
28 | + case PTRACE_GETSIGINFO: | |
29 | + case PTRACE_SETSIGINFO: | |
30 | + (void) CHECK_1 ((siginfo_t *) data); | |
31 | + break; | |
32 | + | |
33 | + case PTRACE_GETEVENTMSG: | |
34 | + (void) CHECK_1 ((unsigned long *) data); | |
35 | + break; | |
36 | + | |
37 | + case PTRACE_SETOPTIONS: | |
38 | + (void) CHECK_1 ((long *) data); | |
39 | + break; | |
40 | + | |
41 | case PTRACE_TRACEME: | |
42 | case PTRACE_CONT: | |
43 | case PTRACE_KILL: | |
44 | --- libc/sysdeps/unix/sysv/linux/sys/ptrace.h | |
45 | +++ libc/sysdeps/unix/sysv/linux/sys/ptrace.h | |
46 | @@ -1,5 +1,5 @@ | |
47 | /* `ptrace' debugger support interface. Linux version. | |
48 | - Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. | |
49 | + Copyright (C) 1996-1999,2000,2006 Free Software Foundation, Inc. | |
50 | This file is part of the GNU C Library. | |
51 | ||
52 | The GNU C Library is free software; you can redistribute it and/or | |
53 | @@ -109,8 +109,24 @@ enum __ptrace_request | |
54 | #define PT_SETFPXREGS PTRACE_SETFPXREGS | |
55 | ||
56 | /* Continue and stop at the next (return from) syscall. */ | |
57 | - PTRACE_SYSCALL = 24 | |
58 | + PTRACE_SYSCALL = 24, | |
59 | #define PT_SYSCALL PTRACE_SYSCALL | |
60 | + | |
61 | + /* Set ptrace filter options. */ | |
62 | + PTRACE_SETOPTIONS = 0x4200, | |
63 | +#define PT_SETOPTIONS PTRACE_SETOPTIONS | |
64 | + | |
65 | + /* Get last ptrace message. */ | |
66 | + PTRACE_GETEVENTMSG = 0x4201, | |
67 | +#define PT_GETEVENTMSG PT_SETOPTIONS | |
68 | + | |
69 | + /* Get siginfo for process. */ | |
70 | + PTRACE_GETSIGINFO = 0x4202, | |
71 | +#define PT_GETSIGINFO PTRACE_GETSIGINFO | |
72 | + | |
73 | + /* Set new siginfo for process. */ | |
74 | + PTRACE_SETSIGINFO = 0x4203 | |
75 | +#define PT_SETSIGINFO PTRACE_SETSIGINFO | |
76 | }; | |
77 | ||
78 | /* Perform process tracing functions. REQUEST is one of the values |