procfs.h (416ba5c74546f32a993436a99516d35008e9f384) | procfs.h (ccb83afd8192c1b5070aa7b4e888223bfd08b00a) |
---|---|
1/*- 2 * Copyright (c) 1998 John D. Polstra. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 35 unchanged lines hidden (view full) --- 44 * 45 * A lot more things should be added to these structures. At present, 46 * they contain the absolute bare minimum required to allow GDB to work 47 * with ELF core dumps. 48 */ 49 50/* 51 * The parenthsized numbers like (1) indicate the minimum version number | 1/*- 2 * Copyright (c) 1998 John D. Polstra. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 35 unchanged lines hidden (view full) --- 44 * 45 * A lot more things should be added to these structures. At present, 46 * they contain the absolute bare minimum required to allow GDB to work 47 * with ELF core dumps. 48 */ 49 50/* 51 * The parenthsized numbers like (1) indicate the minimum version number |
52 * for which each element exists in the structure. | 52 * for which each element exists in the structure. The version number is 53 * not bumped when adding new fields to the end, only if the meaning of 54 * an existing field changes. Additional fields are annotated as (1a), 55 * (1b), etc. to indicate the groupings of additions. |
53 */ 54 55#define PRSTATUS_VERSION 1 /* Current version of prstatus_t */ 56 57typedef struct prstatus { 58 int pr_version; /* Version number of struct (1) */ 59 size_t pr_statussz; /* sizeof(prstatus_t) (1) */ 60 size_t pr_gregsetsz; /* sizeof(gregset_t) (1) */ 61 size_t pr_fpregsetsz; /* sizeof(fpregset_t) (1) */ 62 int pr_osreldate; /* Kernel version (1) */ 63 int pr_cursig; /* Current signal (1) */ | 56 */ 57 58#define PRSTATUS_VERSION 1 /* Current version of prstatus_t */ 59 60typedef struct prstatus { 61 int pr_version; /* Version number of struct (1) */ 62 size_t pr_statussz; /* sizeof(prstatus_t) (1) */ 63 size_t pr_gregsetsz; /* sizeof(gregset_t) (1) */ 64 size_t pr_fpregsetsz; /* sizeof(fpregset_t) (1) */ 65 int pr_osreldate; /* Kernel version (1) */ 66 int pr_cursig; /* Current signal (1) */ |
64 pid_t pr_pid; /* Process ID (1) */ | 67 pid_t pr_pid; /* LWP (Thread) ID (1) */ |
65 gregset_t pr_reg; /* General purpose registers (1) */ 66} prstatus_t; 67 68typedef gregset_t prgregset_t[1]; 69typedef fpregset_t prfpregset_t; 70 71#define PRFNAMESZ 16 /* Maximum command length saved */ 72#define PRARGSZ 80 /* Maximum argument bytes saved */ 73 74#define PRPSINFO_VERSION 1 /* Current version of prpsinfo_t */ 75 76typedef struct prpsinfo { 77 int pr_version; /* Version number of struct (1) */ 78 size_t pr_psinfosz; /* sizeof(prpsinfo_t) (1) */ 79 char pr_fname[PRFNAMESZ+1]; /* Command name, null terminated (1) */ 80 char pr_psargs[PRARGSZ+1]; /* Arguments, null terminated (1) */ | 68 gregset_t pr_reg; /* General purpose registers (1) */ 69} prstatus_t; 70 71typedef gregset_t prgregset_t[1]; 72typedef fpregset_t prfpregset_t; 73 74#define PRFNAMESZ 16 /* Maximum command length saved */ 75#define PRARGSZ 80 /* Maximum argument bytes saved */ 76 77#define PRPSINFO_VERSION 1 /* Current version of prpsinfo_t */ 78 79typedef struct prpsinfo { 80 int pr_version; /* Version number of struct (1) */ 81 size_t pr_psinfosz; /* sizeof(prpsinfo_t) (1) */ 82 char pr_fname[PRFNAMESZ+1]; /* Command name, null terminated (1) */ 83 char pr_psargs[PRARGSZ+1]; /* Arguments, null terminated (1) */ |
84 pid_t pr_pid; /* Process ID (1a) */ |
|
81} prpsinfo_t; 82 83typedef struct thrmisc { 84 char pr_tname[MAXCOMLEN+1]; /* Thread name, null terminated (1) */ 85 u_int _pad; /* Convenience pad, 0-filled (1) */ 86} thrmisc_t; 87 88typedef uint64_t psaddr_t; /* An address in the target process. */ --- 10 unchanged lines hidden (view full) --- 99 struct reg32 pr_reg; 100} prstatus32_t; 101 102typedef struct prpsinfo32 { 103 int32_t pr_version; 104 uint32_t pr_psinfosz; 105 char pr_fname[PRFNAMESZ+1]; 106 char pr_psargs[PRARGSZ+1]; | 85} prpsinfo_t; 86 87typedef struct thrmisc { 88 char pr_tname[MAXCOMLEN+1]; /* Thread name, null terminated (1) */ 89 u_int _pad; /* Convenience pad, 0-filled (1) */ 90} thrmisc_t; 91 92typedef uint64_t psaddr_t; /* An address in the target process. */ --- 10 unchanged lines hidden (view full) --- 103 struct reg32 pr_reg; 104} prstatus32_t; 105 106typedef struct prpsinfo32 { 107 int32_t pr_version; 108 uint32_t pr_psinfosz; 109 char pr_fname[PRFNAMESZ+1]; 110 char pr_psargs[PRARGSZ+1]; |
111 int32_t pr_pid; |
|
107} prpsinfo32_t; 108 109struct thrmisc32 { 110 char pr_tname[MAXCOMLEN+1]; 111 uint32_t _pad; 112}; 113#endif /* __HAVE_REG32 */ 114 115#endif /* _SYS_PROCFS_H_ */ | 112} prpsinfo32_t; 113 114struct thrmisc32 { 115 char pr_tname[MAXCOMLEN+1]; 116 uint32_t _pad; 117}; 118#endif /* __HAVE_REG32 */ 119 120#endif /* _SYS_PROCFS_H_ */ |