|
Packit |
6c4009 |
/* `ptrace' debugger support interface. Linux/S390 version.
|
|
Packit |
6c4009 |
Copyright (C) 2000-2018 Free Software Foundation, Inc.
|
|
Packit |
6c4009 |
Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com).
|
|
Packit |
6c4009 |
This file is part of the GNU C Library.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
The GNU C Library is free software; you can redistribute it and/or
|
|
Packit |
6c4009 |
modify it under the terms of the GNU Lesser General Public
|
|
Packit |
6c4009 |
License as published by the Free Software Foundation; either
|
|
Packit |
6c4009 |
version 2.1 of the License, or (at your option) any later version.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
The GNU C Library is distributed in the hope that it will be useful,
|
|
Packit |
6c4009 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
6c4009 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
6c4009 |
Lesser General Public License for more details.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
You should have received a copy of the GNU Lesser General Public
|
|
Packit |
6c4009 |
License along with the GNU C Library; if not, see
|
|
Packit |
6c4009 |
<http://www.gnu.org/licenses/>. */
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#ifndef _SYS_PTRACE_H
|
|
Packit |
6c4009 |
#define _SYS_PTRACE_H 1
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#include <features.h>
|
|
Packit |
6c4009 |
#include <bits/types.h>
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
__BEGIN_DECLS
|
|
Packit |
6c4009 |
#if defined _LINUX_PTRACE_H || defined _S390_PTRACE_H
|
|
Packit |
6c4009 |
/* Kludge to stop stuff gdb & strace compiles from getting upset
|
|
Packit |
6c4009 |
*/
|
|
Packit |
6c4009 |
# undef PTRACE_TRACEME
|
|
Packit |
6c4009 |
# undef PTRACE_PEEKTEXT
|
|
Packit |
6c4009 |
# undef PTRACE_PEEKDATA
|
|
Packit |
6c4009 |
# undef PTRACE_POKETEXT
|
|
Packit |
6c4009 |
# undef PTRACE_POKEDATA
|
|
Packit |
6c4009 |
# undef PTRACE_CONT
|
|
Packit |
6c4009 |
# undef PTRACE_KILL
|
|
Packit |
6c4009 |
# undef PTRACE_SINGLESTEP
|
|
Packit |
6c4009 |
# undef PTRACE_SINGLEBLOCK
|
|
Packit |
6c4009 |
# undef PTRACE_ATTACH
|
|
Packit |
6c4009 |
# undef PTRACE_DETACH
|
|
Packit |
6c4009 |
# undef PTRACE_SYSCALL
|
|
Packit |
6c4009 |
# undef PTRACE_SETOPTIONS
|
|
Packit |
6c4009 |
# undef PTRACE_GETEVENTMSG
|
|
Packit |
6c4009 |
# undef PTRACE_GETSIGINFO
|
|
Packit |
6c4009 |
# undef PTRACE_SETSIGINFO
|
|
Packit |
6c4009 |
# undef PTRACE_GETREGSET
|
|
Packit |
6c4009 |
# undef PTRACE_SETREGSET
|
|
Packit |
6c4009 |
# undef PTRACE_SEIZE
|
|
Packit |
6c4009 |
# undef PTRACE_INTERRUPT
|
|
Packit |
6c4009 |
# undef PTRACE_LISTEN
|
|
Packit |
6c4009 |
# undef PTRACE_PEEKSIGINFO
|
|
Packit |
6c4009 |
# undef PTRACE_GETSIGMASK
|
|
Packit |
6c4009 |
# undef PTRACE_SETSIGMASK
|
|
Packit |
6c4009 |
# undef PTRACE_SECCOMP_GET_FILTER
|
|
Packit |
6c4009 |
# undef PTRACE_SECCOMP_GET_METADATA
|
|
Packit |
6c4009 |
# undef PTRACE_PEEKUSR_AREA
|
|
Packit |
6c4009 |
# undef PTRACE_POKEUSR_AREA
|
|
Packit |
6c4009 |
# undef PTRACE_GET_LAST_BREAK
|
|
Packit |
6c4009 |
# undef PTRACE_ENABLE_TE
|
|
Packit |
6c4009 |
# undef PTRACE_DISABLE_TE
|
|
Packit |
6c4009 |
# undef PTRACE_TE_ABORT_RAND
|
|
Packit |
6c4009 |
# undef PTRACE_O_TRACESYSGOOD
|
|
Packit |
6c4009 |
# undef PTRACE_O_TRACEFORK
|
|
Packit |
6c4009 |
# undef PTRACE_O_TRACEVFORK
|
|
Packit |
6c4009 |
# undef PTRACE_O_TRACECLONE
|
|
Packit |
6c4009 |
# undef PTRACE_O_TRACEEXEC
|
|
Packit |
6c4009 |
# undef PTRACE_O_TRACEVFORKDONE
|
|
Packit |
6c4009 |
# undef PTRACE_O_TRACEEXIT
|
|
Packit |
6c4009 |
# undef PTRACE_O_TRACESECCOMP
|
|
Packit |
6c4009 |
# undef PTRACE_O_EXITKILL
|
|
Packit |
6c4009 |
# undef PTRACE_O_SUSPEND_SECCOMP
|
|
Packit |
6c4009 |
# undef PTRACE_O_MASK
|
|
Packit |
6c4009 |
# undef PTRACE_EVENT_FORK
|
|
Packit |
6c4009 |
# undef PTRACE_EVENT_VFORK
|
|
Packit |
6c4009 |
# undef PTRACE_EVENT_CLONE
|
|
Packit |
6c4009 |
# undef PTRACE_EVENT_EXEC
|
|
Packit |
6c4009 |
# undef PTRACE_EVENT_VFORK_DONE
|
|
Packit |
6c4009 |
# undef PTRACE_EVENT_EXIT
|
|
Packit |
6c4009 |
# undef PTRACE_EVENT_SECCOMP
|
|
Packit |
6c4009 |
# undef PTRACE_EVENT_STOP
|
|
Packit |
6c4009 |
# undef PTRACE_PEEKSIGINFO_SHARED
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
/* Type of the REQUEST argument to `ptrace.' */
|
|
Packit |
6c4009 |
enum __ptrace_request
|
|
Packit |
6c4009 |
{
|
|
Packit |
6c4009 |
/* Indicate that the process making this request should be traced.
|
|
Packit |
6c4009 |
All signals received by this process can be intercepted by its
|
|
Packit |
6c4009 |
parent, and its parent can use the other `ptrace' requests. */
|
|
Packit |
6c4009 |
PTRACE_TRACEME = 0,
|
|
Packit |
6c4009 |
#define PT_TRACE_ME PTRACE_TRACEME
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Return the word in the process's text space at address ADDR. */
|
|
Packit |
6c4009 |
PTRACE_PEEKTEXT = 1,
|
|
Packit |
6c4009 |
#define PT_READ_I PTRACE_PEEKTEXT
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Return the word in the process's data space at address ADDR. */
|
|
Packit |
6c4009 |
PTRACE_PEEKDATA = 2,
|
|
Packit |
6c4009 |
#define PT_READ_D PTRACE_PEEKDATA
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Return the word in the process's user area at offset ADDR. */
|
|
Packit |
6c4009 |
PTRACE_PEEKUSER = 3,
|
|
Packit |
6c4009 |
#define PT_READ_U PTRACE_PEEKUSER
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Write the word DATA into the process's text space at address ADDR. */
|
|
Packit |
6c4009 |
PTRACE_POKETEXT = 4,
|
|
Packit |
6c4009 |
#define PT_WRITE_I PTRACE_POKETEXT
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Write the word DATA into the process's data space at address ADDR. */
|
|
Packit |
6c4009 |
PTRACE_POKEDATA = 5,
|
|
Packit |
6c4009 |
#define PT_WRITE_D PTRACE_POKEDATA
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Write the word DATA into the process's user area at offset ADDR. */
|
|
Packit |
6c4009 |
PTRACE_POKEUSER = 6,
|
|
Packit |
6c4009 |
#define PT_WRITE_U PTRACE_POKEUSER
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Continue the process. */
|
|
Packit |
6c4009 |
PTRACE_CONT = 7,
|
|
Packit |
6c4009 |
#define PT_CONTINUE PTRACE_CONT
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Kill the process. */
|
|
Packit |
6c4009 |
PTRACE_KILL = 8,
|
|
Packit |
6c4009 |
#define PT_KILL PTRACE_KILL
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Single step the process. */
|
|
Packit |
6c4009 |
PTRACE_SINGLESTEP = 9,
|
|
Packit |
6c4009 |
#define PT_STEP PTRACE_SINGLESTEP
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Execute process until next taken branch. */
|
|
Packit |
6c4009 |
PTRACE_SINGLEBLOCK = 12,
|
|
Packit |
6c4009 |
#define PT_STEPBLOCK PTRACE_SINGLEBLOCK
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Attach to a process that is already running. */
|
|
Packit |
6c4009 |
PTRACE_ATTACH = 16,
|
|
Packit |
6c4009 |
#define PT_ATTACH PTRACE_ATTACH
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Detach from a process attached to with PTRACE_ATTACH. */
|
|
Packit |
6c4009 |
PTRACE_DETACH = 17,
|
|
Packit |
6c4009 |
#define PT_DETACH PTRACE_DETACH
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Continue and stop at the next entry to or return from syscall. */
|
|
Packit |
6c4009 |
PTRACE_SYSCALL = 24,
|
|
Packit |
6c4009 |
#define PT_SYSCALL PTRACE_SYSCALL
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Set ptrace filter options. */
|
|
Packit |
6c4009 |
PTRACE_SETOPTIONS = 0x4200,
|
|
Packit |
6c4009 |
#define PT_SETOPTIONS PTRACE_SETOPTIONS
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Get last ptrace message. */
|
|
Packit |
6c4009 |
PTRACE_GETEVENTMSG = 0x4201,
|
|
Packit |
6c4009 |
#define PT_GETEVENTMSG PTRACE_GETEVENTMSG
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Get siginfo for process. */
|
|
Packit |
6c4009 |
PTRACE_GETSIGINFO = 0x4202,
|
|
Packit |
6c4009 |
#define PT_GETSIGINFO PTRACE_GETSIGINFO
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Set new siginfo for process. */
|
|
Packit |
6c4009 |
PTRACE_SETSIGINFO = 0x4203,
|
|
Packit |
6c4009 |
#define PT_SETSIGINFO PTRACE_SETSIGINFO
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Get register content. */
|
|
Packit |
6c4009 |
PTRACE_GETREGSET = 0x4204,
|
|
Packit |
6c4009 |
#define PTRACE_GETREGSET PTRACE_GETREGSET
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Set register content. */
|
|
Packit |
6c4009 |
PTRACE_SETREGSET = 0x4205,
|
|
Packit |
6c4009 |
#define PTRACE_SETREGSET PTRACE_SETREGSET
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect
|
|
Packit |
6c4009 |
signal or group stop state. */
|
|
Packit |
6c4009 |
PTRACE_SEIZE = 0x4206,
|
|
Packit |
6c4009 |
#define PTRACE_SEIZE PTRACE_SEIZE
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Trap seized tracee. */
|
|
Packit |
6c4009 |
PTRACE_INTERRUPT = 0x4207,
|
|
Packit |
6c4009 |
#define PTRACE_INTERRUPT PTRACE_INTERRUPT
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Wait for next group event. */
|
|
Packit |
6c4009 |
PTRACE_LISTEN = 0x4208,
|
|
Packit |
6c4009 |
#define PTRACE_LISTEN PTRACE_LISTEN
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Retrieve siginfo_t structures without removing signals from a queue. */
|
|
Packit |
6c4009 |
PTRACE_PEEKSIGINFO = 0x4209,
|
|
Packit |
6c4009 |
#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Get the mask of blocked signals. */
|
|
Packit |
6c4009 |
PTRACE_GETSIGMASK = 0x420a,
|
|
Packit |
6c4009 |
#define PTRACE_GETSIGMASK PTRACE_GETSIGMASK
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Change the mask of blocked signals. */
|
|
Packit |
6c4009 |
PTRACE_SETSIGMASK = 0x420b,
|
|
Packit |
6c4009 |
#define PTRACE_SETSIGMASK PTRACE_SETSIGMASK
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Get seccomp BPF filters. */
|
|
Packit |
6c4009 |
PTRACE_SECCOMP_GET_FILTER = 0x420c,
|
|
Packit |
6c4009 |
#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Get seccomp BPF filter metadata. */
|
|
Packit |
6c4009 |
PTRACE_SECCOMP_GET_METADATA = 0x420d,
|
|
Packit |
6c4009 |
#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
PTRACE_PEEKUSR_AREA = 0x5000,
|
|
Packit |
6c4009 |
#define PTRACE_PEEKUSR_AREA PTRACE_PEEKUSR_AREA
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
PTRACE_POKEUSR_AREA = 0x5001,
|
|
Packit |
6c4009 |
#define PTRACE_POKEUSR_AREA PTRACE_POKEUSR_AREA
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
PTRACE_GET_LAST_BREAK = 0x5006,
|
|
Packit |
6c4009 |
#define PTRACE_GET_LAST_BREAK PTRACE_GET_LAST_BREAK
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
PTRACE_ENABLE_TE = 0x5009,
|
|
Packit |
6c4009 |
#define PTRACE_ENABLE_TE PTRACE_ENABLE_TE
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
PTRACE_DISABLE_TE = 0x5010,
|
|
Packit |
6c4009 |
#define PTRACE_DISABLE_TE PTRACE_DISABLE_TE
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
PTRACE_TE_ABORT_RAND = 0x5011
|
|
Packit |
6c4009 |
#define PTRACE_TE_ABORT_RAND PTRACE_TE_ABORT_RAND
|
|
Packit |
6c4009 |
};
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#include <bits/ptrace-shared.h>
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
__END_DECLS
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#endif /* _SYS_PTRACE_H */
|