CORE(5) —
NAME
core − format of memory image file
SYNOPSIS
#include <machine/param.h>
DESCRIPTION
The UNIX operating system writes out a memory image of a terminated process when any of various errors occur. See sigvec(2) for the list of reasons; the most common are memory violations, illegal instructions, bus errors and user-generated quit signals. The memory image is called “core” and is written in the process’s working directory (provided it can be; normal access controls apply).
The maximum size of a core file is limited by setrlimit(2). Files which would be larger than the limit are not created.
The core file consists of the u. area, whose size (in pages) is defined by the UPAGES manifest in the <machine/param.h> file. The u. area starts with the user structure as given in <sys/user.h> and ends with the process kernel stack. Note that this is the opposite of many other 4.3 implementations; it is done this way so that kernel stack overflows are detected before they clobber the user structure. The start of the user structure is UPAGES∗CLSIZE∗NBPG - size of (struct user) bytes from the start of the u. area, this is the value of the symbol UCORE in the kernel symbol table. The remainder of the core file consists first of the data pages and then the stack pages of the process image. The amount of data space image in the core file is given (in pages) by the variable u_dsize in the u. area. The amount of stack image in the core file is given (in pages) by the variable u_ssize in the u. area.
In general, the debugger adb(1) is sufficient to deal with core images.
SEE ALSO
adb(1), dbx(1), setrlimit(2), sigvec(2)
PRPQs 5799-WZQ/5799-PFF: IBM/4.3 — Sept 1988