CORE(5,F) AIX Technical Reference CORE(5,F)
-------------------------------------------------------------------------------
core
PURPOSE
Contains an image of user memory at the time of an error.
SYNOPSIS
#include <sys/b370/coredump.h>
#include <sys/i386/coredump.h>
#include <sys/reg.h>
DESCRIPTION
The system writes a memory image of a terminated process when various errors
occur. See the sigaction system call for the list of errors. The most common
are memory address violations, illegal instructions, bus errors, and
user-generated quit signals. The memory image, called core, is written in the
process working directory.
This memory image file is not written if any of the following are true:
o The process has an effective user ID that is different from the real user
ID.
o A file named core already exists in the current directory and is not
writable by this user or has a link count greater than 1 (one).
o The user does not have write permission in the current directory which is
required to create the memory image file.
o The memory image file resides in a system replicated file system, such as
the root file system. If it is important to create a memory image file for
a daemon or other program which has its current directory in a directory
such as "/", temporarily create a symbolic link named core which points to
a file in another file system.
The memory image file contains common sorts of information about processes
running on AIX/370 and AIX PS/2; however, the files are binary data files and
do need to be examined from the same type of machine on which they were
created. Use the file command to determine which machine type created a memory
image file. Use a user-level debugger such as dbx to interpret a memory image
file.
The first section of the memory image is a header containing parts of the
system's per-user data for the process, including the registers as they were at
the time of the error. It also contains an array of structures describing the
layout of the rest of the memory image file. The remainder of the memory image
file represents the actual contents of the user-writable portions of the
Processed November 7, 1990 CORE(5,F) 1
CORE(5,F) AIX Technical Reference CORE(5,F)
process when the memory image was written. Read-only portions of the memory
image are not dumped.
The format of the information in the first section of the memory image (the
header) is described by the corehdr structure, which is defined in the files
/usr/include/sys/i386/coredump.h and /usr/include/sys/b370/coredump.h. The
general purpose registers are in the cd_regs array as described within that
file. The floating-point registers are in an fp87state structure defined in
/usr/include/sys/regr.h.
The process's memory image is written in segments. The header contains an
array of up to MAX_CORE_SEGS dumpseg structures which describe the segments of
the process (including those which are not dumped). If the segment was dumped,
cs_offset is the segment's offset into the memory image file; otherwise,
cs_offset is 0. The field cs_len is the length of the segment in bytes and the
field cs_address is the virtual address of the segment in the process. The
field cs_type describes the type of segment. The above structures, their
fields, and the possible values of cs_type are described in the files
/usr/include/sys/i386/coredump.h and /usr/include/sys/b370/coredump.h.
FILE
core
RELATED INFORMATION
In this book: "setuid, setgid" and "sigaction, sigvec, signal."
The dbx command in AIX Operating System Commands Reference.
Processed November 7, 1990 CORE(5,F) 2