core(5) - Unix First Edition Manual Page
11/3/71CORE (v)

NAME format of core image
SYNOPSIS
DESCRIPTION Three conditions cause UNIX to write out the core image ofan executing program: the program generates an unexpected


trap (by a bus error or illegal instruction); the usersends a quit signal (which has not been turned off by the program); a trap is simulated by the floating pointsimulator. The core image is called "core" and is written in the current working directory (provided it can be;normal access controls apply). It is exactly 8192+64 bytes long. The first 8192 represent the actual contents ofmemory at the time of the fault; the last 64 are the contents of the system's per--user data area for thisprocess. Only the first word of this area will be described. When any trap which is not an I/O interrupt occurs, all theuseful registers are stored on the stack. After all the registers have been stored, the contents of are placed inthe first cell of the user area; this cell is called u.sp. Therefore, within the core image proper, there is an areawhich contains the following registers in the following order (increasing addresses):


(u.sp)-->scmq acr5 r4r3 r2ri r0pc (at time of fault) processor status (at time of fault) The last two are stored by the hardware. It follows thatthe contents of at the time of the fault were (u.sp) plus 22(10). The t--bit (trap bit) in the stored status will be on when aquit caused the generation of the core image, since this bit is used in the implementation of quits.
FILES
SEE_ALSO

DIAGNOSTICS


11/3/71CORE (v)

BUGS
OWNER ken, dmr