87 specified by coreadm(8) are also part of the core image. Each program
88 header has its p_memsz field set to the size of the mapping. The program
89 headers that represent mappings whose data is included in the core file
90 have their p_filesz field set the same as p_memsz, otherwise p_filesz is
91 zero.
92
93 A mapping's data can be excluded due to the core file content settings
94 (see coreadm(8)), due to a failure, or due to a signal received after
95 core dump initiation but before its completion. If the data is excluded
96 because of a failure, the program header entry will have the
97 PF_SUNW_FAILURE flag set in its p_flags field; if the data is excluded
98 because of a signal, the segment's p_flags field will have the
99 PF_SUNW_KILLED flag set.
100
101 The program headers of an ELF core file also contain entries for two NOTE
102 segments, each containing several note entries as described below. The
103 note entry header and core file note type (n_type) definitions are
104 contained in <sys/elf.h>. The first NOTE segment exists for binary
105 compatibility with old programs that deal with core files. It contains
106 structures defined in <sys/old_procfs.h>. New programs should recognize
107 and skip this BNOTE segment, advancing instead to the new NOTE segment.
108 The old NOTE segment is deleted from core files in a future release.
109
110 The old NOTE segment contains the following entries. Each has entry name
111 CORE and presents the contents of a system structure:
112
113 prpsinfo_t n_type: NT_PRPSINFO. This entry contains information of
114 interest to the ps(1) command, such as process status, CPU
115 usage, nice value, controlling terminal, user-ID, process-ID,
116 the name of the executable, and so forth. The prpsinfo_t
117 structure is defined in <sys/old_procfs.h>.
118
119 char[] n_type: NT_PLATFORM. This entry contains a string describing
120 the specific model of the hardware platform on which this
121 core file was created. This information is the same as
122 provided by sysinfo(2) when invoked with the command
123 SI_PLATFORM.
124
125 auxv_t[] n_type: NT_AUXV. This entry contains the array of Bauxv_t
126 structures that was passed by the operating system as startup
127 information to the dynamic linker. Auxiliary vector
128 information is defined in <sys/auxv.h>.
129
130 Following these entries, for each active (non-zombie) light-weight
131 process (LWP) in the process, the old NOTE segment contains an entry with
132 a prstatus_t structure, plus other optionally-present entries describing
133 the LWP, as follows:
134
135 prstatus_t n_type: NT_PRSTATUS. This structure contains things of
136 interest to a debugger from the operating system, such as
137 the general registers, signal dispositions, state, reason
138 for stopping, process-ID, and so forth. The prstatus_t
139 structure is defined in <sys/old_procfs.h>.
140
141 prfpregset_t n_type: NT_PRFPREG. This entry is present only if the BLWP
142 used the floating-point hardware. It contains the
143 floating-point registers. The prfpregset_t structure is
144 defined in <sys/procfs_isa.h>.
145
146 gwindows_t n_type: NT_GWINDOWS. This entry is present only on a SPARC
147 machine and only if the system was unable to flush all of
148 the register windows to the stack. It contains all of the
149 unspilled register windows. The gwindows_t structure is
150 defined in <sys/regset.h>.
151
152 prxregset_t n_type: NT_PRXREG. This entry is present only if the
153 machine has extra register state associated with it. It
154 contains the extra register state. The prxregset_t
155 structure is defined in sys/procfs_isa.h.
156
157 The new NOTE segment contains the following entries. Each has entry name
158 CORE and presents the contents of a system structure:
159
160 psinfo_t n_type: NT_PSINFO. This structure contains information of
161 interest to the ps(1) command, such as process status, CPU
162 usage, nice value, controlling terminal, user-ID, process-
163 ID, the name of the executable, and so forth. The psinfo_t
164 structure is defined in <sys/procfs.h>
165
166 pstatus_t n_type: NT_PSTATUS. This structure contains things of
167 interest to a debugger from the operating system, such as
168 pending signals, state, process-ID, and so forth. The
169 pstatus_t structure is defined in <sys/procfs.h>.
170
171 char[] n_type: NT_PLATFORM. This entry contains a string
172 describing the specific model of the hardware platform on
173 which this core file was created. This information is the
174 same as provided by sysinfo(2) when invoked with the command
175 SI_PLATFORM.
274 lwpsinfo_t n_type: NT_LWPSINFO. This structure contains information of
275 interest to the ps(1) command, such as LWP status, CPU
276 usage, nice value, LWP-ID, and so forth. The lwpsinfo_t
277 structure is defined in <sys/procfs.h>. This is the only
278 entry present for a zombie LWP.
279
280 lwpstatus_t n_type: NT_LWPSTATUS. This structure contains things of
281 interest to a debugger from the operating system, such as
282 the general registers, the floating point registers, state,
283 reason for stopping, LWP-ID, and so forth. The lwpstatus_t
284 structure is defined in <sys/procfs.h>. gwindows_t n_type:
285 NT_GWINDOWS. This entry is present only on a SPARC machine
286 and only if the system was unable to flush all of the
287 register windows to the stack. It contains all of the
288 unspilled register windows. The gwindows_t structure is
289 defined in <sys/regset.h>.
290
291 prxregset_t n_type: NT_PRXREG. This entry is present only if the
292 machine has extra register state associated with it. It
293 contains the extra register state. The prxregset_t
294 structure is defined in <sys/procfs_isa.h>.
295
296 asrset_t asrset_t n_type: NT_ASRS. This entry is present only on a
297 SPARC V9 machine and only if the process is a 64-bit
298 process. It contains the ancillary state registers for the
299 LWP. The asrset_t asrset_t structure is defined in
300 <sys/regset.h>.
301
302 psinfo_t n_type: NT_SPYMASTER. This entry is present only for an
303 agent LWP and contains the psinfo_t of the process that
304 created the agent LWP. See the proc(5) description of the
305 spymaster entry for more details.
306
307 Depending on the coreadm(8) settings, the section header of an ELF core
308 file can contain entries for CTF, DWARF debug information, symbol table,
309 and string table sections. The sh_addr fields are set to the base
310 address of the first mapping of the load object that they came from to.
311 This can be used to match those sections with the corresponding load
312 object.
313
314 The size of the core file created by a process can be controlled by the
315 user (see getrlimit(2))
316
317 SEE ALSO
318 elfdump(1), gcore(1), mdb(1), proc(1), ps(1), getrlimit(2), setrlimit(2),
319 setuid(2), sysinfo(2), uname(2), upanic(2), getzoneid(3C),
320 getzonenamebyid(3C), elf(3ELF), signal.h(3HEAD), a.out(5), proc(5),
321 security-flags(7), zones(7), coreadm(8)
322
323 illumos August 3, 2021 illumos
|
87 specified by coreadm(8) are also part of the core image. Each program
88 header has its p_memsz field set to the size of the mapping. The program
89 headers that represent mappings whose data is included in the core file
90 have their p_filesz field set the same as p_memsz, otherwise p_filesz is
91 zero.
92
93 A mapping's data can be excluded due to the core file content settings
94 (see coreadm(8)), due to a failure, or due to a signal received after
95 core dump initiation but before its completion. If the data is excluded
96 because of a failure, the program header entry will have the
97 PF_SUNW_FAILURE flag set in its p_flags field; if the data is excluded
98 because of a signal, the segment's p_flags field will have the
99 PF_SUNW_KILLED flag set.
100
101 The program headers of an ELF core file also contain entries for two NOTE
102 segments, each containing several note entries as described below. The
103 note entry header and core file note type (n_type) definitions are
104 contained in <sys/elf.h>. The first NOTE segment exists for binary
105 compatibility with old programs that deal with core files. It contains
106 structures defined in <sys/old_procfs.h>. New programs should recognize
107 and skip this NOTE segment, advancing instead to the new NOTE segment.
108 The old NOTE segment is deleted from core files in a future release.
109
110 The old NOTE segment contains the following entries. Each has entry name
111 CORE and presents the contents of a system structure:
112
113 prpsinfo_t n_type: NT_PRPSINFO. This entry contains information of
114 interest to the ps(1) command, such as process status, CPU
115 usage, nice value, controlling terminal, user-ID, process-ID,
116 the name of the executable, and so forth. The prpsinfo_t
117 structure is defined in <sys/old_procfs.h>.
118
119 char[] n_type: NT_PLATFORM. This entry contains a string describing
120 the specific model of the hardware platform on which this
121 core file was created. This information is the same as
122 provided by sysinfo(2) when invoked with the command
123 SI_PLATFORM.
124
125 auxv_t[] n_type: NT_AUXV. This entry contains the array of Bauxv_t
126 structures that was passed by the operating system as startup
127 information to the dynamic linker. Auxiliary vector
128 information is defined in <sys/auxv.h>.
129
130 Following these entries, for each active (non-zombie) light-weight
131 process (LWP) in the process, the old NOTE segment contains an entry with
132 a prstatus_t structure, plus other optionally-present entries describing
133 the LWP, as follows:
134
135 prstatus_t n_type: NT_PRSTATUS. This structure contains things of
136 interest to a debugger from the operating system, such as
137 the general registers, signal dispositions, state, reason
138 for stopping, process-ID, and so forth. The prstatus_t
139 structure is defined in <sys/old_procfs.h>.
140
141 prfpregset_t n_type: NT_PRFPREG. This entry is present only if the LWP
142 used the floating-point hardware. It contains the
143 floating-point registers. The prfpregset_t structure is
144 defined in <sys/procfs_isa.h>.
145
146 gwindows_t n_type: NT_GWINDOWS. This entry is present only on a SPARC
147 machine and only if the system was unable to flush all of
148 the register windows to the stack. It contains all of the
149 unspilled register windows. The gwindows_t structure is
150 defined in <sys/regset.h>.
151
152 prxregset_t n_type: NT_PRXREG. This entry is no longer included in
153 core files, but is of historical note because in the past
154 it was included on SPARC-based systems. While since then
155 the prxregset_t and extended register sets have been
156 defined on other architectures, they do not emit this in
157 the old note section because there is no binary
158 compatibility.
159
160 The new NOTE segment contains the following entries. Each has entry name
161 CORE and presents the contents of a system structure:
162
163 psinfo_t n_type: NT_PSINFO. This structure contains information of
164 interest to the ps(1) command, such as process status, CPU
165 usage, nice value, controlling terminal, user-ID, process-
166 ID, the name of the executable, and so forth. The psinfo_t
167 structure is defined in <sys/procfs.h>
168
169 pstatus_t n_type: NT_PSTATUS. This structure contains things of
170 interest to a debugger from the operating system, such as
171 pending signals, state, process-ID, and so forth. The
172 pstatus_t structure is defined in <sys/procfs.h>.
173
174 char[] n_type: NT_PLATFORM. This entry contains a string
175 describing the specific model of the hardware platform on
176 which this core file was created. This information is the
177 same as provided by sysinfo(2) when invoked with the command
178 SI_PLATFORM.
277 lwpsinfo_t n_type: NT_LWPSINFO. This structure contains information of
278 interest to the ps(1) command, such as LWP status, CPU
279 usage, nice value, LWP-ID, and so forth. The lwpsinfo_t
280 structure is defined in <sys/procfs.h>. This is the only
281 entry present for a zombie LWP.
282
283 lwpstatus_t n_type: NT_LWPSTATUS. This structure contains things of
284 interest to a debugger from the operating system, such as
285 the general registers, the floating point registers, state,
286 reason for stopping, LWP-ID, and so forth. The lwpstatus_t
287 structure is defined in <sys/procfs.h>. gwindows_t n_type:
288 NT_GWINDOWS. This entry is present only on a SPARC machine
289 and only if the system was unable to flush all of the
290 register windows to the stack. It contains all of the
291 unspilled register windows. The gwindows_t structure is
292 defined in <sys/regset.h>.
293
294 prxregset_t n_type: NT_PRXREG. This entry is present only if the
295 machine has extra register state associated with it. It
296 contains the extra register state. The prxregset_t
297 structure is defined in <sys/procfs_isa.h>; however
298 applications should include <procfs.h> to get access to it.
299 On most architectures the prxregset_t is opaque and is made
300 up of multiple structures because it can vary in length.
301 proc(5) discusses the structure of the extended register set
302 for each supported architecture.
303
304 asrset_t asrset_t n_type: NT_ASRS. This entry is present only on a
305 SPARC V9 machine and only if the process is a 64-bit
306 process. It contains the ancillary state registers for the
307 LWP. The asrset_t asrset_t structure is defined in
308 <sys/regset.h>.
309
310 psinfo_t n_type: NT_SPYMASTER. This entry is present only for an
311 agent LWP and contains the psinfo_t of the process that
312 created the agent LWP. See the proc(5) description of the
313 spymaster entry for more details.
314
315 Depending on the coreadm(8) settings, the section header of an ELF core
316 file can contain entries for CTF, DWARF debug information, symbol table,
317 and string table sections. The sh_addr fields are set to the base
318 address of the first mapping of the load object that they came from to.
319 This can be used to match those sections with the corresponding load
320 object.
321
322 The size of the core file created by a process can be controlled by the
323 user (see getrlimit(2))
324
325 SEE ALSO
326 elfdump(1), gcore(1), mdb(1), proc(1), ps(1), getrlimit(2), setrlimit(2),
327 setuid(2), sysinfo(2), uname(2), upanic(2), getzoneid(3C),
328 getzonenamebyid(3C), elf(3ELF), signal.h(3HEAD), a.out(5), proc(5),
329 security-flags(7), zones(7), coreadm(8)
330
331 illumos January 24, 2023 illumos
|