Dr Andrew Scott G7VAV

My photo
 
June 2025
Mo Tu We Th Fr Sa Su
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 1 2 3 4 5 6


elfcore.h
01: #ifndef _LINUX_ELFCORE_H
02: #define _LINUX_ELFCORE_H
03: 
04: #include <linux/types.h>
05: #include <linux/signal.h>
06: #include <linux/time.h>
07: #include <linux/ptrace.h>
08: #include <linux/elf.h>
09: #include <linux/fs.h>
10: 
11: struct elf_siginfo
12: {
13:         int     si_signo;                       /* signal number */
14:         int     si_code;                        /* extra code */
15:         int     si_errno;                       /* errno */
16: };
17: 
18: 
19: typedef elf_greg_t greg_t;
20: typedef elf_gregset_t gregset_t;
21: typedef elf_fpregset_t fpregset_t;
22: typedef elf_fpxregset_t fpxregset_t;
23: #define NGREG ELF_NGREG
24: 
25: /*
26:  * Definitions to generate Intel SVR4-like core files.
27:  * These mostly have the same names as the SVR4 types with "elf_"
28:  * tacked on the front to prevent clashes with linux definitions,
29:  * and the typedef forms have been avoided.  This is mostly like
30:  * the SVR4 structure, but more Linuxy, with things that Linux does
31:  * not support and which gdb doesn't really use excluded.
32:  * Fields present but not used are marked with "XXX".
33:  */
34: struct elf_prstatus
35: {
36: #if 0
37:         long    pr_flags;       /* XXX Process flags */
38:         short   pr_why;         /* XXX Reason for process halt */
39:         short   pr_what;        /* XXX More detailed reason */
40: #endif
41:         struct elf_siginfo pr_info;     /* Info associated with signal */
42:         short   pr_cursig;              /* Current signal */
43:         unsigned long pr_sigpend;       /* Set of pending signals */
44:         unsigned long pr_sighold;       /* Set of held signals */
45: #if 0
46:         struct sigaltstack pr_altstack; /* Alternate stack info */
47:         struct sigaction pr_action;     /* Signal action for current sig */
48: #endif
49:         pid_t   pr_pid;
50:         pid_t   pr_ppid;
51:         pid_t   pr_pgrp;
52:         pid_t   pr_sid;
53:         struct timeval pr_utime;        /* User time */
54:         struct timeval pr_stime;        /* System time */
55:         struct timeval pr_cutime;       /* Cumulative user time */
56:         struct timeval pr_cstime;       /* Cumulative system time */
57: #if 0
58:         long    pr_instr;               /* Current instruction */
59: #endif
60:         elf_gregset_t pr_reg;   /* GP registers */
61: #ifdef CONFIG_BINFMT_ELF_FDPIC
62:         /* When using FDPIC, the loadmap addresses need to be communicated
63:          * to GDB in order for GDB to do the necessary relocations.  The
64:          * fields (below) used to communicate this information are placed
65:          * immediately after ``pr_reg'', so that the loadmap addresses may
66:          * be viewed as part of the register set if so desired.
67:          */
68:         unsigned long pr_exec_fdpic_loadmap;
69:         unsigned long pr_interp_fdpic_loadmap;
70: #endif
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:         __kernel_uid_t  pr_uid;
84:         __kernel_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: typedef struct elf_prstatus prstatus_t;
92: typedef struct elf_prpsinfo prpsinfo_t;
93: #define PRARGSZ ELF_PRARGSZ 
94: 
95: 
96: #endif /* _LINUX_ELFCORE_H */
97: 


for client (none)
© Andrew Scott 2006 - 2025,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/