date and time created 91/03/22 14:06:13 by bostic
[unix-history] / usr / src / share / man / man5 / core.5
CommitLineData
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
10core \- format of memory image file
aa6cecc5 11.SH SYNOPSIS
15cdbbef 12.B #include <sys/param.h>
a31f4e53 13.SH DESCRIPTION
aa6cecc5
KM
14The UNIX System writes out a memory image of a terminated
15process when any of various errors occur. See
16.IR sigvec (2)
17for the list of reasons; the most common are memory violations, illegal
18instructions, bus errors, and user-generated quit signals.
a31f4e53 19The memory image is called `core' and is written in the process's
aa6cecc5 20working directory (provided it can be; normal access controls apply).
a31f4e53
KM
21.PP
22The maximum size of a
23.I core
24file is limited by
aa6cecc5 25.IR setrlimit (2).
a31f4e53
KM
26Files which would be larger than the limit are not created.
27.PP
aa6cecc5
KM
28The core file consists of the
29.I u.
30area, whose size (in pages) is
31defined by the UPAGES manifest in the
15cdbbef 32.RI < sys/param.h >
aa6cecc5
KM
33file. The
34.I u.
35area starts with a
36.I user
37structure as given in
38.RI < sys/user.h >.
a31f4e53
KM
39The remainder of the core file consists first of the data pages and then
40the stack pages of the process image.
aa6cecc5
KM
41The amount of data space image in the core file is given (in pages) by the
42variable
43.I u_dsize
44in the
45.I u.
46area.
47The amount of stack image in the core file is given (in pages) by the
48variable
49.I u_ssize
50in the
51.I u.
52area.
15cdbbef
MK
53The size of a ``page'' is given by the constant NBPG
54(also from
55.RI < sys/param.h >).
a31f4e53
KM
56.PP
57In general the debugger
58.IR adb (1)
59is sufficient to deal with core images.
60.SH "SEE ALSO"
aa6cecc5 61adb(1), dbx(1), sigvec(2), setrlimit(2)