root/include/linux/elfcore.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   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 struct elf_siginfo
  11 {
  12         int     si_signo;                       /* signal number */
  13         int     si_code;                        /* extra code */
  14         int     si_errno;                       /* errno */
  15 };
  16 
  17 typedef unsigned long elf_greg_t;
  18 #define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t))
  19 typedef elf_greg_t elf_gregset_t[ELF_NGREG];
  20 typedef struct
  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 typedef elf_greg_t greg_t;
  30 typedef elf_gregset_t gregset_t;
  31 typedef elf_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 struct elf_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         struct elf_siginfo pr_info;     /* Info associated with signal */
  52         short   pr_cursig;      /* Current signal */
  53         sigset_t pr_sigpend;    /* Set of pending signals */
  54         sigset_t pr_sighold;    /* Set of held signals */
  55 #if 0
  56         struct sigaltstack pr_altstack; /* Alternate stack info */
  57         struct sigaction pr_action;     /* Signal action for current sig */
  58 #endif
  59         pid_t   pr_pid;
  60         pid_t   pr_ppid;
  61         pid_t   pr_pgrp;
  62         pid_t   pr_sid;
  63         struct timeval pr_utime;        /* User time */
  64         struct timeval pr_stime;        /* System time */
  65         struct timeval pr_cutime;       /* Cumulative user time */
  66         struct timeval pr_cstime;       /* Cumulative system time */
  67 #if 0
  68         long    pr_instr;               /* Current instruction */
  69 #endif
  70         elf_gregset_t pr_reg;   /* GP registers */
  71         int pr_fpvalid;         /* True if math co-processor being used.  */
  72 };
  73 
  74 #define ELF_PRARGSZ     (80)    /* Number of chars for args */
  75 
  76 struct elf_prpsinfo
  77 {
  78         char    pr_state;       /* numeric process state */
  79         char    pr_sname;       /* char for pr_state */
  80         char    pr_zomb;        /* zombie */
  81         char    pr_nice;        /* nice val */
  82         unsigned long pr_flag;  /* flags */
  83         uid_t   pr_uid;
  84         gid_t   pr_gid;
  85         pid_t   pr_pid, pr_ppid, pr_pgrp, pr_sid;
  86         /* Lots missing */
  87         char    pr_fname[16];   /* filename of executable */
  88         char    pr_psargs[ELF_PRARGSZ]; /* initial part of arg list */
  89 };
  90 
  91 #ifndef __KERNEL__
  92 typedef struct elf_prstatus prstatus_t;
  93 typedef struct elf_prpsinfo prpsinfo_t;
  94 #define PRARGSZ ELF_PRARGSZ 
  95 #endif
  96 
  97 #endif /* _LINUX_ELFCORE_H */

/* [previous][next][first][last][top][bottom][index][help] */