1 #ifndef_LINUX_ELFCORE_H 2 #define_LINUX_ELFCORE_H 3
4 #include <linux/types.h>
5 #include <linux/signal.h>
6 #include <linux/time.h>
7 #include <linux/ptrace.h>
8 #include <linux/user.h>
9
10 structelf_siginfo 11 { 12 intsi_signo; /* signal number */ 13 int si_code; /* extra code */ 14 int si_errno; /* errno */ 15 };
16
17 #include <asm/elf.h>
18
19 #ifndef__KERNEL__ 20 typedefelf_greg_t greg_t;
21 typedefelf_gregset_t gregset_t;
22 typedefelf_fpregset_t fpregset_t;
23 #define NGREG ELF_NGREG 24 #endif 25
26 /* 27 * Definitons to generate Intel SVR4-like core files. 28 * These mostly have the same names as the SVR4 types with "elf_" 29 * tacked on the front to prevent clashes with linux definitions, 30 * and the typedef forms have been avoided. This is mostly like 31 * the SVR4 structure, but more Linuxy, with things that Linux does 32 * not support and which gdb doesn't really use excluded. 33 * Fields present but not used are marked with "XXX". 34 */ 35 structelf_prstatus 36 { 37 #if 0
38 long pr_flags; /* XXX Process flags */ 39 short pr_why; /* XXX Reason for process halt */ 40 short pr_what; /* XXX More detailed reason */ 41 #endif 42 structelf_siginfopr_info; /* Info associated with signal */ 43 shortpr_cursig; /* Current signal */ 44 sigset_tpr_sigpend; /* Set of pending signals */ 45 sigset_tpr_sighold; /* Set of held signals */ 46 #if 0
47 struct sigaltstack pr_altstack; /* Alternate stack info */ 48 structsigaction pr_action; /* Signal action for current sig */ 49 #endif 50 pid_tpr_pid;
51 pid_tpr_ppid;
52 pid_tpr_pgrp;
53 pid_tpr_sid;
54 structtimevalpr_utime; /* User time */ 55 structtimevalpr_stime; /* System time */ 56 structtimevalpr_cutime; /* Cumulative user time */ 57 structtimevalpr_cstime; /* Cumulative system time */ 58 #if 0
59 long pr_instr; /* Current instruction */ 60 #endif 61 elf_gregset_tpr_reg; /* GP registers */ 62 intpr_fpvalid; /* True if math co-processor being used. */ 63 };
64
65 #defineELF_PRARGSZ (80) /* Number of chars for args */ 66
67 structelf_prpsinfo 68 { 69 charpr_state; /* numeric process state */ 70 charpr_sname; /* char for pr_state */ 71 charpr_zomb; /* zombie */ 72 charpr_nice; /* nice val */ 73 unsignedlongpr_flag; /* flags */ 74 uid_tpr_uid;
75 gid_tpr_gid;
76 pid_tpr_pid, pr_ppid, pr_pgrp, pr_sid;
77 /* Lots missing */ 78 charpr_fname[16]; /* filename of executable */ 79 charpr_psargs[ELF_PRARGSZ]; /* initial part of arg list */ 80 };
81
82 #ifndef__KERNEL__ 83 typedefstructelf_prstatusprstatus_t;
84 typedefstructelf_prpsinfoprpsinfo_t;
85 #define PRARGSZ ELF_PRARGSZ 86 #endif 87
88 #endif/* _LINUX_ELFCORE_H */