[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Files Reference

core File Format (AIX 4.2)

Purpose

Contains an image of a 32-bit process at the time of an error.

Description

A core file is created in the current directory when various errors occur. .Errors such as memory-address violations, illegal instructions, bus errors, and user-generated quit signals commonly cause this core dump. The core file that is created contains a memory image of the terminated process. A process with a saved user ID that differs from the real user ID does not produce a memory image. The contents of a core dump are organized sequentially in the core file as follows:

Core header Defines basic information about the core dump, and contains offsets which locate the remainder of the core dump information.
ldinfo structures Defines loader information.
mstsave structures Defines kernel thread state information. Since the faulting thread mstsave structure is directly saved in the core header, additional structures are saved here only for multi-threaded programs.
Default user stack Contains a copy of the user stack at the time of the core dump.
Default data area (Optional) Contains the user data section.
Memory mapped regions (Optional) Contains the anonymously mapped regions.
vm_info structures (Optional) Contains offset and size information for memory mapped regions.

The core_dump structure, defined by the core.h file, occurs at the beginning of a core file. The core_dump structure includes the following fields:

Field Type Field Name Description
char c_signo The number of the signal that caused the error
char c_flag A bit field that describes the core dump type. The meanings of the bits are as follows:


FULL_CORE core contains the data sections (0x01)


CORE_VERSION_1 core was generated by AIX Version 4 or higher (0x02)


MSTS_VALID core contains mstsave structures (0x04)


CORE_BIGDATA core contains big data (0x08)


UBLOCK_VALID core contains the u_block structure (0x10)


USTACK_VALID core contains the user stack (0x20)


LE_VALID core contains at least one module (0x40)


CORE_TRUNC core was truncated (0x80)
ushort c_entries The number of core dump modules
struct ld_info * c_tab The offset to the beginning of the core table
caddr_t c_stack The offset to the beginning of the user stack
int c_size The size of the user stack
struct mstsave c_mst A copy of the faulting mst
struct user c_u A copy of the user structure
int c_nmsts The number of mstsave structures referenced by the c_msts field
struct mstsave * c_msts The offset to the other threads' mstsave structures
int c_datasize The size of the data region
caddr_t c_data The offset to user data
int c_vmregions The number of anonymously mapped regions
struct vm_info * c_vmm The offset to the start of the vm_info table

The c_u field contains the user structure (a copy of the actual u_block), which includes the registers as they existed at the time of the fault.

The ld_info structure and then the user-mode stack follow the u_block in the core dump.

By default, the user data, anonymously mapped regions, and vm_info structures are not included in a core dump. This partial core dump includes the current thread stack, the thread mstsave structures, the user structures, and the state of the registers at the time of the fault. A partial core dump contains sufficient information for a stack traceback. The size of a core dump can also be limited by the setrlimit subroutine.

To enable a full core dump, set the SA_FULLDUMP flag in the sigaction subroutine for the signal that is to generate a full core dump. If this flag is set when the core is dumped, the data section, anonymously mapped regions, and vm_info structures are included in the core dump.

Related Information

The param.h file.

The adb command, dbx command.

The raise subroutine, setrlimit subroutine, setuid subroutine, sigaction subroutine.

The Header Files Overview in AIX 5L Version 5.2 Files Reference defines header files, describes how they are used, and lists several header files for which information is provided in this documentation.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]