Commit | Line | Data |
---|---|---|
a31f4e53 KM |
1 | .\" Copyright (c) 1980 Regents of the University of California. |
2 | .\" All rights reserved. The Berkeley software License Agreement | |
3 | .\" specifies the terms and conditions for redistribution. | |
4 | .\" | |
15cdbbef | 5 | .\" @(#)core.5 6.2 (Berkeley) %G% |
a31f4e53 | 6 | .\" |
95967544 | 7 | .TH CORE 5 "" |
a31f4e53 KM |
8 | .UC 4 |
9 | .SH NAME | |
10 | core \- format of memory image file | |
aa6cecc5 | 11 | .SH SYNOPSIS |
15cdbbef | 12 | .B #include <sys/param.h> |
a31f4e53 | 13 | .SH DESCRIPTION |
aa6cecc5 KM |
14 | The UNIX System writes out a memory image of a terminated |
15 | process when any of various errors occur. See | |
16 | .IR sigvec (2) | |
17 | for the list of reasons; the most common are memory violations, illegal | |
18 | instructions, bus errors, and user-generated quit signals. | |
a31f4e53 | 19 | The memory image is called `core' and is written in the process's |
aa6cecc5 | 20 | working directory (provided it can be; normal access controls apply). |
a31f4e53 KM |
21 | .PP |
22 | The maximum size of a | |
23 | .I core | |
24 | file is limited by | |
aa6cecc5 | 25 | .IR setrlimit (2). |
a31f4e53 KM |
26 | Files which would be larger than the limit are not created. |
27 | .PP | |
aa6cecc5 KM |
28 | The core file consists of the |
29 | .I u. | |
30 | area, whose size (in pages) is | |
31 | defined by the UPAGES manifest in the | |
15cdbbef | 32 | .RI < sys/param.h > |
aa6cecc5 KM |
33 | file. The |
34 | .I u. | |
35 | area starts with a | |
36 | .I user | |
37 | structure as given in | |
38 | .RI < sys/user.h >. | |
a31f4e53 KM |
39 | The remainder of the core file consists first of the data pages and then |
40 | the stack pages of the process image. | |
aa6cecc5 KM |
41 | The amount of data space image in the core file is given (in pages) by the |
42 | variable | |
43 | .I u_dsize | |
44 | in the | |
45 | .I u. | |
46 | area. | |
47 | The amount of stack image in the core file is given (in pages) by the | |
48 | variable | |
49 | .I u_ssize | |
50 | in the | |
51 | .I u. | |
52 | area. | |
15cdbbef MK |
53 | The size of a ``page'' is given by the constant NBPG |
54 | (also from | |
55 | .RI < sys/param.h >). | |
a31f4e53 KM |
56 | .PP |
57 | In general the debugger | |
58 | .IR adb (1) | |
59 | is sufficient to deal with core images. | |
60 | .SH "SEE ALSO" | |
aa6cecc5 | 61 | adb(1), dbx(1), sigvec(2), setrlimit(2) |