Blame sysdeps/unix/sysv/linux/bits/ptrace-shared.h

Packit 6c4009
/* `ptrace' debugger support interface.  Linux version,
Packit 6c4009
   not architecture-specific.
Packit 6c4009
   Copyright (C) 1996-2018 Free Software Foundation, Inc.
Packit 6c4009
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
# error "Never use <bits/ptrace-shared.h> directly; include <sys/ptrace.h> instead."
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* Options set using PTRACE_SETOPTIONS.  */
Packit 6c4009
enum __ptrace_setoptions
Packit 6c4009
{
Packit 6c4009
  PTRACE_O_TRACESYSGOOD	= 0x00000001,
Packit 6c4009
  PTRACE_O_TRACEFORK	= 0x00000002,
Packit 6c4009
  PTRACE_O_TRACEVFORK	= 0x00000004,
Packit 6c4009
  PTRACE_O_TRACECLONE	= 0x00000008,
Packit 6c4009
  PTRACE_O_TRACEEXEC	= 0x00000010,
Packit 6c4009
  PTRACE_O_TRACEVFORKDONE = 0x00000020,
Packit 6c4009
  PTRACE_O_TRACEEXIT	= 0x00000040,
Packit 6c4009
  PTRACE_O_TRACESECCOMP	= 0x00000080,
Packit 6c4009
  PTRACE_O_EXITKILL	= 0x00100000,
Packit 6c4009
  PTRACE_O_SUSPEND_SECCOMP = 0x00200000,
Packit 6c4009
  PTRACE_O_MASK		= 0x003000ff
Packit 6c4009
};
Packit 6c4009
Packit 6c4009
enum __ptrace_eventcodes
Packit 6c4009
{
Packit 6c4009
/* Wait extended result codes for the above trace options.  */
Packit 6c4009
  PTRACE_EVENT_FORK	= 1,
Packit 6c4009
  PTRACE_EVENT_VFORK	= 2,
Packit 6c4009
  PTRACE_EVENT_CLONE	= 3,
Packit 6c4009
  PTRACE_EVENT_EXEC	= 4,
Packit 6c4009
  PTRACE_EVENT_VFORK_DONE = 5,
Packit 6c4009
  PTRACE_EVENT_EXIT	= 6,
Packit 6c4009
  PTRACE_EVENT_SECCOMP  = 7,
Packit 6c4009
/* Extended result codes enabled by means other than options.  */
Packit 6c4009
  PTRACE_EVENT_STOP	= 128
Packit 6c4009
};
Packit 6c4009
Packit 6c4009
/* Arguments for PTRACE_PEEKSIGINFO.  */
Packit 6c4009
struct __ptrace_peeksiginfo_args
Packit 6c4009
{
Packit 6c4009
  __uint64_t off;	/* From which siginfo to start.  */
Packit 6c4009
  __uint32_t flags;	/* Flags for peeksiginfo.  */
Packit 6c4009
  __int32_t nr;		/* How many siginfos to take.  */
Packit 6c4009
};
Packit 6c4009
Packit 6c4009
enum __ptrace_peeksiginfo_flags
Packit 6c4009
{
Packit 6c4009
  /* Read signals from a shared (process wide) queue.  */
Packit 6c4009
  PTRACE_PEEKSIGINFO_SHARED = (1 << 0)
Packit 6c4009
};
Packit 6c4009
Packit 6c4009
/* Argument and results of PTRACE_SECCOMP_GET_METADATA.  */
Packit 6c4009
struct __ptrace_seccomp_metadata
Packit 6c4009
{
Packit 6c4009
  __uint64_t filter_off;	/* Input: which filter.  */
Packit 6c4009
  __uint64_t flags;		/* Output: filter's flags.  */
Packit 6c4009
};
Packit 6c4009
Packit 6c4009
/* Perform process tracing functions.  REQUEST is one of the values
Packit 6c4009
   above, and determines the action to be taken.
Packit 6c4009
   For all requests except PTRACE_TRACEME, PID specifies the process to be
Packit 6c4009
   traced.
Packit 6c4009
Packit 6c4009
   PID and the other arguments described above for the various requests should
Packit 6c4009
   appear (those that are used for the particular request) as:
Packit 6c4009
     pid_t PID, void *ADDR, int DATA, void *ADDR2
Packit 6c4009
   after REQUEST.  */
Packit 6c4009
extern long int ptrace (enum __ptrace_request __request, ...) __THROW;