COHERENT manpages
This page displays the COHERENT manpage for core [Format of a core-dump file].
List of available manpages
Index
core -- System Administration Format of a core-dump file #include <sys/core.h> When a process terminates abnormally because a it encounters an unrecoverable error or receives an asynchronous signal from another process, COHERENT tries to write a copy of its image in memory into a file called core. You can examine this file with the debugger db and other tools to try to determine what went wrong. The structure ch_info appears at the head of a core file. The header file core.h defines it as follows: struct ch_info { unsigned short ch_magic; unsigned int ch_info_len; }; Field ch_magic is always set to the constant CORE_MAGIC. This ``magic'' value signifies to COHERENT that this is a core file. Field ch_info_len gives a count of information bytes in the core file, including the ch_info structure itself. If the value of ch_info_len exceeds the size of the ch_info structure, this indicates that data follow the ch_info structure. These data follow the ch_info structure, and are in the form of a core_proc structure. Header file <sys/core.h> defines this structure as follows: struct core_proc { gregset_t cp_registers; int cp_signal_number; struct _fpstate cp_floating_point; dregset_t cp_debug_registers; }; This substitutes for a dump of the u area, whose information is reserved for the kernel alone. This is followed by an image of each process segment. The data for each segment consists of the following: a header, which is a structure of type core_seg; cs_pathlen bytes of data that give the path name of the file from the segment data originated; and cs_dumped bytes of core-image data. core.h defines strucutre core_seg as follows: struct core_seg { size_t cs_pathlen; /* length of path name */ off_t cs_dumped; /* dumped size in bytes */ caddr_t cs_base; /* virtual base address */ off_t cs_size; /* full size in bytes */ unsigned long cs_reserved[8]; }; The order of the segments is the text segment first (if it is present -- usually it is omitted), followed by the data segment, and then the stack segment. The contents of the text segment can usually be identified from the program being debugged. The patchable kernel variable DUMP_TEXT allows the COHERENT kernel to dump text segments as well as data and stack segments. Patchable kernel variable DUMP_LIM sets the maximum size of a segment within a core file. The system uses this limit to keep keep core files from getting out of hand. See Also Administering COHERENT, core.h, signal(), wait() Diagnostics COHERENT will not write core if that file already exists as a non-ordinary file or if there is more than one link to it. The 0200 bit in the status returned to the parent process by wait() indicates a successful dump. For a list of signals that automatically trigger a core dump, see the Lexicon entry for signal().