1 /* Copyright (C) 1991, 92, 93, 95, 96, 97 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, write to the Free
16 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20 #include <sys/ptrace.h>
21 #include <sys/types.h>
24 /* Perform process tracing functions. REQUEST is one of the values
25 in <sys/ptrace.h>, and determines the action to be taken.
26 For all requests except PTRACE_TRACEME, PID specifies the process to be
29 PID and the other arguments described above for the various requests should
30 appear (those that are used for the particular request) as:
31 pid_t PID, void *ADDR, int DATA, void *ADDR2
35 enum __ptrace_request request
;
48 case PTRACE_SINGLESTEP
:
58 #ifdef PTRACE_GETFPREGS
59 case PTRACE_GETFPGEGS
:
61 case PTRACE_SETFPREGS
:
62 case PTRACE_GETFPAREGS
:
63 case PTRACE_SETFPAREGS
:
64 va_start(ap
, request
);
65 pid
= va_arg(ap
, pid_t
);
66 addr
= va_arg(ap
, void *);
73 va_start(ap
, request
);
74 pid
= va_arg(ap
, pid_t
);
75 addr
= va_arg(ap
, void *);
76 data
= va_arg(ap
, int);
81 case PTRACE_WRITEDATA
:
83 case PTRACE_WRITETEXT
:
84 va_start(ap
, request
);
85 pid
= va_arg(ap
, pid_t
);
86 addr
= va_arg(ap
, void *);
87 data
= va_arg(ap
, int);
88 addr2
= va_arg(ap
, void *);
102 stub_warning (ptrace
)
103 #include <stub-tag.h>