| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | .\" $NetBSD: core.5,v 1.29 2017/03/26 23:49:28 kamil Exp $ | | 1 | .\" $NetBSD: core.5,v 1.30 2017/03/27 07:45:37 wiz Exp $ |
2 | .\" | | 2 | .\" |
3 | .\" Copyright (c) 2002 The NetBSD Foundation, Inc. | | 3 | .\" Copyright (c) 2002 The NetBSD Foundation, Inc. |
4 | .\" All rights reserved. | | 4 | .\" All rights reserved. |
5 | .\" | | 5 | .\" |
6 | .\" This code is derived from software contributed to The NetBSD Foundation | | 6 | .\" This code is derived from software contributed to The NetBSD Foundation |
7 | .\" by Jason R. Thorpe. | | 7 | .\" by Jason R. Thorpe. |
8 | .\" | | 8 | .\" |
9 | .\" Redistribution and use in source and binary forms, with or without | | 9 | .\" Redistribution and use in source and binary forms, with or without |
10 | .\" modification, are permitted provided that the following conditions | | 10 | .\" modification, are permitted provided that the following conditions |
11 | .\" are met: | | 11 | .\" are met: |
12 | .\" 1. Redistributions of source code must retain the above copyright | | 12 | .\" 1. Redistributions of source code must retain the above copyright |
13 | .\" notice, this list of conditions and the following disclaimer. | | 13 | .\" notice, this list of conditions and the following disclaimer. |
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | | 14 | .\" 2. Redistributions in binary form must reproduce the above copyright |
| @@ -129,27 +129,28 @@ Files which would be larger than the lim | | | @@ -129,27 +129,28 @@ Files which would be larger than the lim |
129 | .Ss ELF CORE FORMAT | | 129 | .Ss ELF CORE FORMAT |
130 | ELF-format core files are described by a standard ELF exec header and | | 130 | ELF-format core files are described by a standard ELF exec header and |
131 | a series of ELF program headers. | | 131 | a series of ELF program headers. |
132 | Each program header describes a range | | 132 | Each program header describes a range |
133 | of the virtual address space of the process. | | 133 | of the virtual address space of the process. |
134 | .Pp | | 134 | .Pp |
135 | In addition, | | 135 | In addition, |
136 | .Nx | | 136 | .Nx |
137 | ELF core files include an ELF note section which provides additional | | 137 | ELF core files include an ELF note section which provides additional |
138 | information about the process. | | 138 | information about the process. |
139 | The first note in the note section has a note name of | | 139 | The first note in the note section has a note name of |
140 | .Dq NetBSD-CORE | | 140 | .Dq NetBSD-CORE |
141 | and a note type of | | 141 | and a note type of |
142 | ELF_NOTE_NETBSD_CORE_PROCINFO (1), and contains the following | | 142 | .Dv ELF_NOTE_NETBSD_CORE_PROCINFO ( 1 ) , |
| | | 143 | and contains the following |
143 | structure: | | 144 | structure: |
144 | .Bd -literal | | 145 | .Bd -literal |
145 | struct netbsd_elfcore_procinfo { | | 146 | struct netbsd_elfcore_procinfo { |
146 | /* Version 1 fields start here. */ | | 147 | /* Version 1 fields start here. */ |
147 | uint32_t cpi_version; /* netbsd_elfcore_procinfo version */ | | 148 | uint32_t cpi_version; /* netbsd_elfcore_procinfo version */ |
148 | uint32_t cpi_cpisize; /* sizeof(netbsd_elfcore_procinfo) */ | | 149 | uint32_t cpi_cpisize; /* sizeof(netbsd_elfcore_procinfo) */ |
149 | uint32_t cpi_signo; /* killing signal */ | | 150 | uint32_t cpi_signo; /* killing signal */ |
150 | uint32_t cpi_sigcode; /* signal code */ | | 151 | uint32_t cpi_sigcode; /* signal code */ |
151 | uint32_t cpi_sigpend[4]; /* pending signals */ | | 152 | uint32_t cpi_sigpend[4]; /* pending signals */ |
152 | uint32_t cpi_sigmask[4]; /* blocked signals */ | | 153 | uint32_t cpi_sigmask[4]; /* blocked signals */ |
153 | uint32_t cpi_sigignore[4]; /* blocked signals */ | | 154 | uint32_t cpi_sigignore[4]; /* blocked signals */ |
154 | uint32_t cpi_sigcatch[4]; /* blocked signals */ | | 155 | uint32_t cpi_sigcatch[4]; /* blocked signals */ |
155 | int32_t cpi_pid; /* process ID */ | | 156 | int32_t cpi_pid; /* process ID */ |
| @@ -223,27 +224,27 @@ Effective group ID of the process. | | | @@ -223,27 +224,27 @@ Effective group ID of the process. |
223 | Saved group ID of the process. | | 224 | Saved group ID of the process. |
224 | .It cpi_nlwps | | 225 | .It cpi_nlwps |
225 | Number of kernel-visible execution contexts (LWPs) of the process. | | 226 | Number of kernel-visible execution contexts (LWPs) of the process. |
226 | .It cpi_name | | 227 | .It cpi_name |
227 | Process name, copied from the p_comm field of | | 228 | Process name, copied from the p_comm field of |
228 | .Fa struct proc . | | 229 | .Fa struct proc . |
229 | .It cpi_siglwp | | 230 | .It cpi_siglwp |
230 | LWP target of killing signal. | | 231 | LWP target of killing signal. |
231 | .El | | 232 | .El |
232 | .Pp | | 233 | .Pp |
233 | The second note with name | | 234 | The second note with name |
234 | .Dq NetBSD-CORE | | 235 | .Dq NetBSD-CORE |
235 | is a note type of | | 236 | is a note type of |
236 | ELF_NOTE_NETBSD_CORE_AUXV (2), | | 237 | .Dv ELF_NOTE_NETBSD_CORE_AUXV ( 2 ) , |
237 | and contains an array of AuxInfo structures. | | 238 | and contains an array of AuxInfo structures. |
238 | .Pp | | 239 | .Pp |
239 | The note section also contains additional notes for each | | 240 | The note section also contains additional notes for each |
240 | kernel-visible execution context of the process (LWP). | | 241 | kernel-visible execution context of the process (LWP). |
241 | These notes have names of the form | | 242 | These notes have names of the form |
242 | .Dq NetBSD-CORE@nn | | 243 | .Dq NetBSD-CORE@nn |
243 | where | | 244 | where |
244 | .Dq nn | | 245 | .Dq nn |
245 | is the LWP ID of the execution context, for example: | | 246 | is the LWP ID of the execution context, for example: |
246 | .Dq NetBSD-CORE@1 . | | 247 | .Dq NetBSD-CORE@1 . |
247 | These notes contain register and other per-execution context | | 248 | These notes contain register and other per-execution context |
248 | data in the same format as is used by the | | 249 | data in the same format as is used by the |
249 | .Xr ptrace 2 | | 250 | .Xr ptrace 2 |