1 /******************************************************************************
2  * elfcore.h
3  *
4  * Based heavily on include/linux/elfcore.h from Linux 2.6.16
5  * Naming scheeme based on include/xen/elf.h (not include/linux/elfcore.h)
6  *
7  */
8 
9 #ifndef __ELFCOREC_H__
10 #define __ELFCOREC_H__
11 
12 #include <xen/types.h>
13 #include <xen/elf.h>
14 #include <asm/elf.h>
15 #include <public/xen.h>
16 
17 #define NT_PRSTATUS     1
18 
19 typedef struct
20 {
21     int signo;                       /* signal number */
22     int code;                        /* extra code */
23     int errno;                       /* errno */
24 } ELF_Signifo;
25 
26 /* These seem to be the same length on all architectures on Linux */
27 typedef int ELF_Pid;
28 typedef struct {
29 	long tv_sec;
30 	long tv_usec;
31 } ELF_Timeval;
32 
33 /*
34  * Definitions to generate Intel SVR4-like core files.
35  * These mostly have the same names as the SVR4 types with "elf_"
36  * tacked on the front to prevent clashes with linux definitions,
37  * and the typedef forms have been avoided.  This is mostly like
38  * the SVR4 structure, but more Linuxy, with things that Linux does
39  * not support and which gdb doesn't really use excluded.
40  */
41 typedef struct
42 {
43     ELF_Signifo pr_info;         /* Info associated with signal */
44     short pr_cursig;             /* Current signal */
45     unsigned long pr_sigpend;    /* Set of pending signals */
46     unsigned long pr_sighold;    /* Set of held signals */
47     ELF_Pid pr_pid;
48     ELF_Pid pr_ppid;
49     ELF_Pid pr_pgrp;
50     ELF_Pid pr_sid;
51     ELF_Timeval pr_utime;        /* User time */
52     ELF_Timeval pr_stime;        /* System time */
53     ELF_Timeval pr_cutime;       /* Cumulative user time */
54     ELF_Timeval pr_cstime;       /* Cumulative system time */
55     ELF_Gregset pr_reg;          /* GP registers - from asm header file */
56     int pr_fpvalid;              /* True if math co-processor being used.  */
57 } ELF_Prstatus;
58 
59 typedef struct {
60     unsigned long xen_major_version;
61     unsigned long xen_minor_version;
62     unsigned long xen_extra_version;
63     unsigned long xen_changeset;
64     unsigned long xen_compiler;
65     unsigned long xen_compile_date;
66     unsigned long xen_compile_time;
67     unsigned long tainted;
68 #if defined(CONFIG_X86)
69     unsigned long xen_phys_start;
70     unsigned long dom0_pfn_to_mfn_frame_list_list;
71 #endif
72 } crash_xen_info_t;
73 
74 #endif /* __ELFCOREC_H__ */
75 
76 /*
77  * Local variables:
78  * mode: C
79  * c-file-style: "BSD"
80  * c-basic-offset: 4
81  * tab-width: 4
82  * indent-tabs-mode: nil
83  * End:
84  */
85