1 /* Copyright (C) 1996 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 Library General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 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 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public
15 License along with the GNU C Library; see the file COPYING.LIB. If
16 not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA. */
21 #define _SYS_PROCFS_H 1
24 /* This is somehow modelled after the file of the same name on SysVr4
25 systems. It provides a definition of the core file format for ELF
30 #include <sys/types.h>
35 int si_signo
; /* signal number */
36 int si_code
; /* extra code */
37 int si_errno
; /* errno */
40 typedef elf_greg_t greg_t
;
41 typedef elf_gregset_t gregset_t
;
42 typedef elf_fpregset_t fpregset_t
;
43 #define NGREG ELF_NGREG
45 /* Definitions to generate Intel SVR4-like core files. These mostly
46 have the same names as the SVR4 types with "elf_" tacked on the
47 front to prevent clashes with linux definitions, and the typedef
48 forms have been avoided. This is mostly like the SVR4 structure,
49 but more Linuxy, with things that Linux does not support and which
50 gdb doesn't really use excluded. Fields present but not used are
55 long pr_flags
; /* XXX Process flags */
56 short pr_why
; /* XXX Reason for process halt */
57 short pr_what
; /* XXX More detailed reason */
59 struct elf_siginfo pr_info
; /* Info associated with signal */
60 short pr_cursig
; /* Current signal */
61 sigset_t pr_sigpend
; /* Set of pending signals */
62 sigset_t pr_sighold
; /* Set of held signals */
64 struct sigaltstack pr_altstack
; /* Alternate stack info */
65 struct sigaction pr_action
; /* Signal action for current sig */
71 struct timeval pr_utime
; /* User time */
72 struct timeval pr_stime
; /* System time */
73 struct timeval pr_cutime
; /* Cumulative user time */
74 struct timeval pr_cstime
; /* Cumulative system time */
76 long pr_instr
; /* Current instruction */
78 elf_gregset_t pr_reg
; /* GP registers */
79 int pr_fpvalid
; /* True if math copro being used. */
83 #define ELF_PRARGSZ (80) /* Number of chars for args */
87 char pr_state
; /* numeric process state */
88 char pr_sname
; /* char for pr_state */
89 char pr_zomb
; /* zombie */
90 char pr_nice
; /* nice val */
91 unsigned long pr_flag
; /* flags */
94 pid_t pr_pid
, pr_ppid
, pr_pgrp
, pr_sid
;
96 char pr_fname
[16]; /* filename of executable */
97 char pr_psargs
[ELF_PRARGSZ
]; /* initial part of arg list */
101 typedef struct elf_prstatus prstatus_t
;
102 typedef struct elf_prpsinfo prpsinfo_t
;
105 #endif /* sys/procfs.h */