| 1 | #ifndef _LINUX_ELFCORE_H |
|---|
| 2 | #define _LINUX_ELFCORE_H |
|---|
| 3 | |
|---|
| 4 | #include <linux/types.h> |
|---|
| 5 | #include <linux/signal.h> |
|---|
| 6 | #include <sys/time.h> |
|---|
| 7 | #include <linux/user.h> |
|---|
| 8 | |
|---|
| 9 | struct elf_siginfo |
|---|
| 10 | { |
|---|
| 11 | int si_signo; /* signal number */ |
|---|
| 12 | int si_code; /* extra code */ |
|---|
| 13 | int si_errno; /* errno */ |
|---|
| 14 | }; |
|---|
| 15 | |
|---|
| 16 | #include <asm/elf.h> |
|---|
| 17 | |
|---|
| 18 | typedef elf_greg_t greg_t; |
|---|
| 19 | typedef elf_gregset_t gregset_t; |
|---|
| 20 | typedef elf_fpregset_t fpregset_t; |
|---|
| 21 | typedef elf_fpxregset_t fpxregset_t; |
|---|
| 22 | #define NGREG ELF_NGREG |
|---|
| 23 | |
|---|
| 24 | /* |
|---|
| 25 | * Definitions to generate Intel SVR4-like core files. |
|---|
| 26 | * These mostly have the same names as the SVR4 types with "elf_" |
|---|
| 27 | * tacked on the front to prevent clashes with linux definitions, |
|---|
| 28 | * and the typedef forms have been avoided. This is mostly like |
|---|
| 29 | * the SVR4 structure, but more Linuxy, with things that Linux does |
|---|
| 30 | * not support and which gdb doesn't really use excluded. |
|---|
| 31 | * Fields present but not used are marked with "XXX". |
|---|
| 32 | */ |
|---|
| 33 | struct elf_prstatus |
|---|
| 34 | { |
|---|
| 35 | #if 0 |
|---|
| 36 | long pr_flags; /* XXX Process flags */ |
|---|
| 37 | short pr_why; /* XXX Reason for process halt */ |
|---|
| 38 | short pr_what; /* XXX More detailed reason */ |
|---|
| 39 | #endif |
|---|
| 40 | struct elf_siginfo pr_info; /* Info associated with signal */ |
|---|
| 41 | short pr_cursig; /* Current signal */ |
|---|
| 42 | unsigned long pr_sigpend; /* Set of pending signals */ |
|---|
| 43 | unsigned long pr_sighold; /* Set of held signals */ |
|---|
| 44 | #if 0 |
|---|
| 45 | struct sigaltstack pr_altstack; /* Alternate stack info */ |
|---|
| 46 | struct sigaction pr_action; /* Signal action for current sig */ |
|---|
| 47 | #endif |
|---|
| 48 | pid_t pr_pid; |
|---|
| 49 | pid_t pr_ppid; |
|---|
| 50 | pid_t pr_pgrp; |
|---|
| 51 | pid_t pr_sid; |
|---|
| 52 | struct timeval pr_utime; /* User time */ |
|---|
| 53 | struct timeval pr_stime; /* System time */ |
|---|
| 54 | struct timeval pr_cutime; /* Cumulative user time */ |
|---|
| 55 | struct timeval pr_cstime; /* Cumulative system time */ |
|---|
| 56 | #if 0 |
|---|
| 57 | long pr_instr; /* Current instruction */ |
|---|
| 58 | #endif |
|---|
| 59 | elf_gregset_t pr_reg; /* GP registers */ |
|---|
| 60 | int pr_fpvalid; /* True if math co-processor being used. */ |
|---|
| 61 | }; |
|---|
| 62 | |
|---|
| 63 | #define ELF_PRARGSZ (80) /* Number of chars for args */ |
|---|
| 64 | |
|---|
| 65 | struct elf_prpsinfo |
|---|
| 66 | { |
|---|
| 67 | char pr_state; /* numeric process state */ |
|---|
| 68 | char pr_sname; /* char for pr_state */ |
|---|
| 69 | char pr_zomb; /* zombie */ |
|---|
| 70 | char pr_nice; /* nice val */ |
|---|
| 71 | unsigned long pr_flag; /* flags */ |
|---|
| 72 | __kernel_uid_t pr_uid; |
|---|
| 73 | __kernel_gid_t pr_gid; |
|---|
| 74 | pid_t pr_pid, pr_ppid, pr_pgrp, pr_sid; |
|---|
| 75 | /* Lots missing */ |
|---|
| 76 | char pr_fname[16]; /* filename of executable */ |
|---|
| 77 | char pr_psargs[ELF_PRARGSZ]; /* initial part of arg list */ |
|---|
| 78 | }; |
|---|
| 79 | |
|---|
| 80 | typedef struct elf_prstatus prstatus_t; |
|---|
| 81 | typedef struct elf_prpsinfo prpsinfo_t; |
|---|
| 82 | #define PRARGSZ ELF_PRARGSZ |
|---|
| 83 | |
|---|
| 84 | |
|---|
| 85 | #endif /* _LINUX_ELFCORE_H */ |
|---|