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