]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/unix/sysv/linux/arm/sys/procfs.h
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / arm / sys / procfs.h
CommitLineData
b168057a 1/* Copyright (C) 1996-2015 Free Software Foundation, Inc.
7733584f
UD
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
3214b89b
AJ
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.
7733584f
UD
8
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
3214b89b 12 Lesser General Public License for more details.
7733584f 13
3214b89b 14 You should have received a copy of the GNU Lesser General Public
ab84e3ff
PE
15 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
7733584f
UD
17
18#ifndef _SYS_PROCFS_H
7733584f 19#define _SYS_PROCFS_H 1
7733584f 20
c2a38d01 21/* This is somewhat modelled after the file of the same name on SVR4
7733584f 22 systems. It provides a definition of the core file format for ELF
c2a38d01
UD
23 used on Linux. It doesn't have anything to do with the /proc file
24 system, even though Linux has one.
25
26 Anyway, the whole purpose of this file is for GDB and GDB only.
27 Don't read too much into it. Don't use it for anything other than
28 GDB unless you know what you are doing. */
7733584f 29
1e70a8a3 30#include <features.h>
7733584f
UD
31#include <sys/time.h>
32#include <sys/types.h>
33#include <sys/user.h>
7733584f
UD
34
35__BEGIN_DECLS
36
c2a38d01
UD
37/* Type for a general-purpose register. */
38typedef unsigned long elf_greg_t;
39
40/* And the whole bunch of them. We could have used `struct
41 user_regs' directly in the typedef, but tradition says that
42 the register set is an array, which does have some peculiar
43 semantics, so leave it that way. */
44#define ELF_NGREG (sizeof (struct user_regs) / sizeof(elf_greg_t))
45typedef elf_greg_t elf_gregset_t[ELF_NGREG];
46
47/* Register set for the floating-point registers. */
48typedef struct user_fpregs elf_fpregset_t;
49
50/* Signal info. */
7733584f
UD
51struct elf_siginfo
52 {
53 int si_signo; /* Signal number. */
54 int si_code; /* Extra code. */
55 int si_errno; /* Errno. */
56 };
57
c2a38d01
UD
58/* Definitions to generate Intel SVR4-like core files. These mostly
59 have the same names as the SVR4 types with "elf_" tacked on the
60 front to prevent clashes with Linux definitions, and the typedef
61 forms have been avoided. This is mostly like the SVR4 structure,
62 but more Linuxy, with things that Linux does not support and which
63 GDB doesn't really use excluded. */
64
7733584f
UD
65struct elf_prstatus
66 {
7733584f
UD
67 struct elf_siginfo pr_info; /* Info associated with signal. */
68 short int pr_cursig; /* Current signal. */
69 unsigned long int pr_sigpend; /* Set of pending signals. */
70 unsigned long int pr_sighold; /* Set of held signals. */
7733584f
UD
71 __pid_t pr_pid;
72 __pid_t pr_ppid;
73 __pid_t pr_pgrp;
74 __pid_t pr_sid;
75 struct timeval pr_utime; /* User time. */
76 struct timeval pr_stime; /* System time. */
77 struct timeval pr_cutime; /* Cumulative user time. */
78 struct timeval pr_cstime; /* Cumulative system time. */
7733584f
UD
79 elf_gregset_t pr_reg; /* GP registers. */
80 int pr_fpvalid; /* True if math copro being used. */
81 };
82
83
c2a38d01 84#define ELF_PRARGSZ (80) /* Number of chars for args. */
7733584f
UD
85
86struct elf_prpsinfo
87 {
88 char pr_state; /* Numeric process state. */
89 char pr_sname; /* Char for pr_state. */
90 char pr_zomb; /* Zombie. */
91 char pr_nice; /* Nice val. */
92 unsigned long int pr_flag; /* Flags. */
93 unsigned short int pr_uid;
94 unsigned short int pr_gid;
95 int pr_pid, pr_ppid, pr_pgrp, pr_sid;
96 /* Lots missing */
97 char pr_fname[16]; /* Filename of executable. */
98 char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */
99 };
100
c2a38d01
UD
101/* The rest of this file provides the types for emulation of the
102 Solaris <proc_service.h> interfaces that should be implemented by
103 users of libthread_db. */
104
1e70a8a3
UD
105/* Addresses. */
106typedef void *psaddr_t;
107
108/* Register sets. Linux has different names. */
c2a38d01
UD
109typedef elf_gregset_t prgregset_t;
110typedef elf_fpregset_t prfpregset_t;
1e70a8a3
UD
111
112/* We don't have any differences between processes and threads,
c2a38d01 113 therefore have only one PID type. */
1e70a8a3 114typedef __pid_t lwpid_t;
7733584f 115
c2a38d01 116/* Process status and info. In the end we do provide typedefs for them. */
7733584f
UD
117typedef struct elf_prstatus prstatus_t;
118typedef struct elf_prpsinfo prpsinfo_t;
119
120__END_DECLS
121
122#endif /* sys/procfs.h */