Blame sysdeps/unix/sysv/linux/arm/sys/procfs.h

Packit Service 82fcde
/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
Packit Service 82fcde
   This file is part of the GNU C Library.
Packit Service 82fcde
Packit Service 82fcde
   The GNU C Library is free software; you can redistribute it and/or
Packit Service 82fcde
   modify it under the terms of the GNU Lesser General Public
Packit Service 82fcde
   License as published by the Free Software Foundation; either
Packit Service 82fcde
   version 2.1 of the License, or (at your option) any later version.
Packit Service 82fcde
Packit Service 82fcde
   The GNU C Library is distributed in the hope that it will be useful,
Packit Service 82fcde
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 82fcde
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service 82fcde
   Lesser General Public License for more details.
Packit Service 82fcde
Packit Service 82fcde
   You should have received a copy of the GNU Lesser General Public
Packit Service 82fcde
   License along with the GNU C Library.  If not, see
Packit Service 82fcde
   <http://www.gnu.org/licenses/>.  */
Packit Service 82fcde
Packit Service 82fcde
#ifndef _SYS_PROCFS_H
Packit Service 82fcde
#define _SYS_PROCFS_H	1
Packit Service 82fcde
Packit Service 82fcde
/* This is somewhat modelled after the file of the same name on SVR4
Packit Service 82fcde
   systems.  It provides a definition of the core file format for ELF
Packit Service 82fcde
   used on Linux.  It doesn't have anything to do with the /proc file
Packit Service 82fcde
   system, even though Linux has one.
Packit Service 82fcde
Packit Service 82fcde
   Anyway, the whole purpose of this file is for GDB and GDB only.
Packit Service 82fcde
   Don't read too much into it.  Don't use it for anything other than
Packit Service 82fcde
   GDB unless you know what you are doing.  */
Packit Service 82fcde
Packit Service 82fcde
#include <features.h>
Packit Service 82fcde
#include <sys/time.h>
Packit Service 82fcde
#include <sys/types.h>
Packit Service 82fcde
#include <sys/user.h>
Packit Service 82fcde
Packit Service 82fcde
__BEGIN_DECLS
Packit Service 82fcde
Packit Service 82fcde
/* Type for a general-purpose register.  */
Packit Service 82fcde
typedef unsigned long elf_greg_t;
Packit Service 82fcde
Packit Service 82fcde
/* And the whole bunch of them.  We could have used `struct
Packit Service 82fcde
   user_regs' directly in the typedef, but tradition says that
Packit Service 82fcde
   the register set is an array, which does have some peculiar
Packit Service 82fcde
   semantics, so leave it that way.  */
Packit Service 82fcde
#define ELF_NGREG (sizeof (struct user_regs) / sizeof(elf_greg_t))
Packit Service 82fcde
typedef elf_greg_t elf_gregset_t[ELF_NGREG];
Packit Service 82fcde
Packit Service 82fcde
/* Register set for the floating-point registers.  */
Packit Service 82fcde
typedef struct user_fpregs elf_fpregset_t;
Packit Service 82fcde
Packit Service 82fcde
/* Signal info.  */
Packit Service 82fcde
struct elf_siginfo
Packit Service 82fcde
  {
Packit Service 82fcde
    int si_signo;			/* Signal number.  */
Packit Service 82fcde
    int si_code;			/* Extra code.  */
Packit Service 82fcde
    int si_errno;			/* Errno.  */
Packit Service 82fcde
  };
Packit Service 82fcde
Packit Service 82fcde
/* Definitions to generate Intel SVR4-like core files.  These mostly
Packit Service 82fcde
   have the same names as the SVR4 types with "elf_" tacked on the
Packit Service 82fcde
   front to prevent clashes with Linux definitions, and the typedef
Packit Service 82fcde
   forms have been avoided.  This is mostly like the SVR4 structure,
Packit Service 82fcde
   but more Linuxy, with things that Linux does not support and which
Packit Service 82fcde
   GDB doesn't really use excluded.  */
Packit Service 82fcde
Packit Service 82fcde
struct elf_prstatus
Packit Service 82fcde
  {
Packit Service 82fcde
    struct elf_siginfo pr_info;		/* Info associated with signal.  */
Packit Service 82fcde
    short int pr_cursig;		/* Current signal.  */
Packit Service 82fcde
    unsigned long int pr_sigpend;	/* Set of pending signals.  */
Packit Service 82fcde
    unsigned long int pr_sighold;	/* Set of held signals.  */
Packit Service 82fcde
    __pid_t pr_pid;
Packit Service 82fcde
    __pid_t pr_ppid;
Packit Service 82fcde
    __pid_t pr_pgrp;
Packit Service 82fcde
    __pid_t pr_sid;
Packit Service 82fcde
    struct timeval pr_utime;		/* User time.  */
Packit Service 82fcde
    struct timeval pr_stime;		/* System time.  */
Packit Service 82fcde
    struct timeval pr_cutime;		/* Cumulative user time.  */
Packit Service 82fcde
    struct timeval pr_cstime;		/* Cumulative system time.  */
Packit Service 82fcde
    elf_gregset_t pr_reg;		/* GP registers.  */
Packit Service 82fcde
    int pr_fpvalid;			/* True if math copro being used.  */
Packit Service 82fcde
  };
Packit Service 82fcde
Packit Service 82fcde
Packit Service 82fcde
#define ELF_PRARGSZ     (80)    /* Number of chars for args.  */
Packit Service 82fcde
Packit Service 82fcde
struct elf_prpsinfo
Packit Service 82fcde
  {
Packit Service 82fcde
    char pr_state;			/* Numeric process state.  */
Packit Service 82fcde
    char pr_sname;			/* Char for pr_state.  */
Packit Service 82fcde
    char pr_zomb;			/* Zombie.  */
Packit Service 82fcde
    char pr_nice;			/* Nice val.  */
Packit Service 82fcde
    unsigned long int pr_flag;		/* Flags.  */
Packit Service 82fcde
    unsigned short int pr_uid;
Packit Service 82fcde
    unsigned short int pr_gid;
Packit Service 82fcde
    int pr_pid, pr_ppid, pr_pgrp, pr_sid;
Packit Service 82fcde
    /* Lots missing */
Packit Service 82fcde
    char pr_fname[16];			/* Filename of executable.  */
Packit Service 82fcde
    char pr_psargs[ELF_PRARGSZ];	/* Initial part of arg list.  */
Packit Service 82fcde
  };
Packit Service 82fcde
Packit Service 82fcde
/* The rest of this file provides the types for emulation of the
Packit Service 82fcde
   Solaris <proc_service.h> interfaces that should be implemented by
Packit Service 82fcde
   users of libthread_db.  */
Packit Service 82fcde
Packit Service 82fcde
/* Addresses.  */
Packit Service 82fcde
typedef void *psaddr_t;
Packit Service 82fcde
Packit Service 82fcde
/* Register sets.  Linux has different names.  */
Packit Service 82fcde
typedef elf_gregset_t prgregset_t;
Packit Service 82fcde
typedef elf_fpregset_t prfpregset_t;
Packit Service 82fcde
Packit Service 82fcde
/* We don't have any differences between processes and threads,
Packit Service 82fcde
   therefore have only one PID type.  */
Packit Service 82fcde
typedef __pid_t lwpid_t;
Packit Service 82fcde
Packit Service 82fcde
/* Process status and info.  In the end we do provide typedefs for them.  */
Packit Service 82fcde
typedef struct elf_prstatus prstatus_t;
Packit Service 82fcde
typedef struct elf_prpsinfo prpsinfo_t;
Packit Service 82fcde
Packit Service 82fcde
__END_DECLS
Packit Service 82fcde
Packit Service 82fcde
#endif	/* sys/procfs.h */