1 /* 2 * This file mainly provides a definition of the structures used 3 * to describe the notes section of an ELF file. It doesn't have 4 * anything to do with the /proc file system, even though MINIX 5 * has one. 6 * 7 * The whole purpose of this file is for GDB and GDB only. 8 */ 9 10 #ifndef _SYS_PROCFS_H_ 11 #define _SYS_PROCFS_H_ 12 13 #include <sys/param.h> 14 #include <sys/elf_core.h> 15 #include <i386/stackframe.h> 16 17 /* 18 * 19 * These structures define an interface between core files and the debugger. 20 * Never change or delete any elements. These structures are modeled from 21 * the file with the same name from FreeBSD 22 * 23 * A lot more things should be added to these structures. At present, 24 * they contain the absolute bare minimum required to allow GDB to work 25 * with ELF core dumps. 26 */ 27 28 /* 29 * The parenthsized numbers like (1) indicate the minimum version number 30 * for which each element exists in the structure. 31 */ 32 33 #define PRSTATUS_VERSION 1 /* Current version of prstatus_t */ 34 35 typedef struct prstatus { 36 int pr_version; /* Version number of struct (1) */ 37 size_t pr_statussz; /* sizeof(prstatus_t) (1) */ 38 size_t pr_gregsetsz; /* sizeof(gregset_t) (1) */ 39 size_t pr_fpregsetsz; /* sizeof(fpregset_t) (1) */ 40 int pr_osreldate; /* Kernel version (1) */ 41 int pr_cursig; /* Current signal (1) */ 42 pid_t pr_pid; /* Process ID (1) */ 43 gregset_t pr_reg; /* General purpose registers (1) */ 44 } prstatus_t; 45 46 #define PRARGSZ 80 /* Maximum argument bytes saved */ 47 48 #ifndef MAXCOMLEN 49 # define MAXCOMLEN 16 /* Maximum command line arguments */ 50 #endif 51 52 #define PRPSINFO_VERSION 1 /* Current version of prpsinfo_t */ 53 54 typedef struct prpsinfo { 55 int pr_version; /* Version number of struct (1) */ 56 size_t pr_psinfosz; /* sizeof(prpsinfo_t) (1) */ 57 char pr_fname[MAXCOMLEN+1]; /* Command name, null terminated (1) */ 58 char pr_psargs[PRARGSZ+1]; /* Arguments, null terminated (1) */ 59 } prpsinfo_t; 60 61 #endif /* _SYS_PROCFS_H_ */ 62 63