Commit | Line | Data |
---|---|---|
517c4acb KB |
1 | .\" Copyright (c) 1980, 1991, 1993 |
2 | .\" The Regents of the University of California. All rights reserved. | |
a31f4e53 | 3 | .\" |
ad787160 C |
4 | .\" Redistribution and use in source and binary forms, with or without |
5 | .\" modification, are permitted provided that the following conditions | |
6 | .\" are met: | |
7 | .\" 1. Redistributions of source code must retain the above copyright | |
8 | .\" notice, this list of conditions and the following disclaimer. | |
9 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
10 | .\" notice, this list of conditions and the following disclaimer in the | |
11 | .\" documentation and/or other materials provided with the distribution. | |
12 | .\" 3. All advertising materials mentioning features or use of this software | |
13 | .\" must display the following acknowledgement: | |
14 | .\" This product includes software developed by the University of | |
15 | .\" California, Berkeley and its contributors. | |
16 | .\" 4. Neither the name of the University nor the names of its contributors | |
17 | .\" may be used to endorse or promote products derived from this software | |
18 | .\" without specific prior written permission. | |
a31f4e53 | 19 | .\" |
ad787160 C |
20 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
21 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
22 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
23 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
24 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
25 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
26 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
27 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
28 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
30 | .\" SUCH DAMAGE. | |
d4b7a6e5 | 31 | .\" |
ed554bc5 | 32 | .\" @(#)core.5 8.3 (Berkeley) 12/11/93 |
ad787160 | 33 | .\" |
ed554bc5 | 34 | .Dd December 11, 1993 |
d4b7a6e5 CL |
35 | .Dt CORE 5 |
36 | .Os BSD 4 | |
37 | .Sh NAME | |
38 | .Nm core | |
39 | .Nd memory image file format | |
40 | .Sh SYNOPSIS | |
41 | .Fd #include <sys/param.h> | |
42 | .Sh DESCRIPTION | |
43 | A small number of signals which cause abnormal termination of a process | |
44 | also cause a record of the process's in-core state to be written | |
653ba8b6 | 45 | to disk for later examination by one of the available debuggers. |
d4b7a6e5 CL |
46 | (See |
47 | .Xr sigaction 2 . ) | |
48 | This memory image is written to a file named | |
6a5b6cb6 | 49 | .Nm programname.core |
d4b7a6e5 CL |
50 | in the working directory; |
51 | provided the terminated process had write permission in the directory, | |
653ba8b6 | 52 | and provided the abnormality did not cause |
d4b7a6e5 CL |
53 | a system crash. |
54 | (In this event, the decision to save the core file is arbitrary, see | |
55 | .Xr savecore 8 . ) | |
56 | .Pp | |
a31f4e53 | 57 | The maximum size of a |
6a5b6cb6 | 58 | .Nm programname.core |
a31f4e53 | 59 | file is limited by |
d4b7a6e5 | 60 | .Xr setrlimit 2 . |
a31f4e53 | 61 | Files which would be larger than the limit are not created. |
d4b7a6e5 CL |
62 | .Pp |
63 | The | |
6a5b6cb6 | 64 | .Nm programname.core |
d4b7a6e5 CL |
65 | file consists of the |
66 | .Fa u . | |
aa6cecc5 | 67 | area, whose size (in pages) is |
d4b7a6e5 CL |
68 | defined by the |
69 | .Dv UPAGES | |
70 | manifest in the | |
71 | .Aq Pa sys/param.h | |
aa6cecc5 | 72 | file. The |
d4b7a6e5 | 73 | .Fa u . |
aa6cecc5 | 74 | area starts with a |
d4b7a6e5 | 75 | .Fa user |
aa6cecc5 | 76 | structure as given in |
d4b7a6e5 CL |
77 | .Aq Pa sys/user.h . |
78 | The remainder of the | |
6a5b6cb6 | 79 | .Nm programname.core |
d4b7a6e5 | 80 | file consists of the data pages followed by |
a31f4e53 | 81 | the stack pages of the process image. |
d4b7a6e5 | 82 | The amount of data space image in the |
6a5b6cb6 | 83 | .Nm programname.core |
d4b7a6e5 | 84 | file is given (in pages) by the |
aa6cecc5 | 85 | variable |
d4b7a6e5 | 86 | .Fa u_dsize |
aa6cecc5 | 87 | in the |
d4b7a6e5 | 88 | .Fa u . |
aa6cecc5 KM |
89 | area. |
90 | The amount of stack image in the core file is given (in pages) by the | |
91 | variable | |
d4b7a6e5 | 92 | .Fa u_ssize |
aa6cecc5 | 93 | in the |
d4b7a6e5 | 94 | .Ar u . |
aa6cecc5 | 95 | area. |
d4b7a6e5 CL |
96 | The size of a ``page'' is given by the constant |
97 | .Dv NBPG | |
15cdbbef | 98 | (also from |
d4b7a6e5 CL |
99 | .Aq Pa sys/param.h ) . |
100 | .Sh SEE ALSO | |
101 | .Xr adb 1 , | |
102 | .Xr dbx 1 , | |
103 | .Xr gdb 1 , | |
104 | .Xr kgdb 1 , | |
105 | .Xr sigaction 2 , | |
106 | .Xr setrlimit 2 | |
107 | .Sh HISTORY | |
108 | A | |
6a5b6cb6 | 109 | .Nm core |
d4b7a6e5 CL |
110 | file format appeared in |
111 | .At v6 . |