]> git.saurik.com Git - apple/xnu.git/blame - bsd/man/man5/core.5
xnu-7195.101.1.tar.gz
[apple/xnu.git] / bsd / man / man5 / core.5
CommitLineData
b0d623f7 1.\""Copyright (c) 2001-2007 Apple Inc. All Rights Reserved.
9bccf70c
A
2.\"The contents of this file constitute Original Code as defined in and are
3.\"subject to the Apple Public Source License Version 1.2 (the 'License').
4.\"You may not use this file except in compliance with the
5.\"License. Please obtain a copy of the License at
6.\"http://www.apple.com/publicsource and read it before using this file.
7.\"
8.\"This Original Code and all software distributed under the License are
9.\"distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
10.\"EXPRESS OR IMPLIED, AND APPLE
11.\"HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY
12.\"WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
13.\"QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the
14.\"specific language governing rights and limitations under the License."
b0d623f7 15.Dd June 26, 2008
9bccf70c
A
16.Dt CORE 5
17.Os
18.Sh NAME
19.Nm core
20.Nd memory image file format
21.Sh SYNOPSIS
22.In sys/param.h
23.Sh DESCRIPTION
24A small number of signals which cause abnormal termination of a process
25also cause a record of the process's in-core state to be written
26to disk for later examination by one of the available debuggers.
27(See
28.Xr sigaction 2 . )
29This memory image is written to a file named by default
2d21ac55
A
30.Pa core.pid ,
31where
32.Va pid
33is the process ID of the process,
9bccf70c 34in the
2d21ac55
A
35.Pa /cores
36directory,
9bccf70c
A
37provided the terminated process had write permission in the directory,
38and the directory existed.
39.Pp
40The maximum size of a core file is limited by
41.Xr setrlimit 2 .
42Files which would be larger than the limit are not created.
43.Pp
44The core file consists of the
2d21ac55 45.Xr Mach-O 5
9bccf70c 46header as described in the
55e303ae 47.Aq Pa mach-o/loader.h
9bccf70c
A
48file.
49The remainder of the core
50file consists of various sections described in the
51.Xr Mach-O 5
52header.
55e303ae 53.Sh NOTE
2d21ac55 54Core dumps are disabled by default under Darwin/Mac OS X. To re-enable
b0d623f7
A
55core dumps, a privileged user must do one of the following
56.Pp
57* Edit
58.Pa /etc/launchd.conf
59or
60.Pa $HOME/.launchd.conf
61and add a line specifying the limit
62.Pa limit core unlimited
63.Pp
64* A privileged user can also enable cores with
65.Pa launchctl limit core unlimited
66.Pp
67* A privileged user can also enable core files by using
68.Xr ulimit 1
69or
70.Xr limit 1
71depending upon the shell.
9bccf70c
A
72.Sh SEE ALSO
73.Xr gdb 1 ,
74.Xr setrlimit 2 ,
75.Xr sigaction 2 ,
55e303ae 76.Xr Mach-O 5 ,
b0d623f7
A
77.Xr launchd.conf 5 ,
78.Xr launchd.plist 5 ,
9bccf70c
A
79.Xr sysctl 8
80.Sh HISTORY
81A
82.Nm
83file format appeared in
84.At v6 .