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

Files Reference

core File Format (AIX 4.3)


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


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 that locate the remainder of the core dump information.
ldinfo structures Defines loader information.
thrdctx structures Defines kernel thread state information. Since the faulting thread thrdctx structure is directly saved in the core header, additional structures are saved here only for multi-threaded programs.
segregion structures Contains the address, size, and type for shared memory segments of the faulting process.
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.
vm_infox structures (Optional) Contains offset and size information for memory mapped regions.
Memory mapped regions (Optional) Contains the memory mapped regions.

The core_dumpx structure, defined by the core.h file, occurs at the beginning of a core file. The core_dumpx 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
int c_version Core file format version
unsigned long long c_fdsinfox Offset to fd region in file
unsigned long long c_loader Offset to loader region in file
unsigned long long c_lsize Size of the loader region
uint c_n_thr Number of elements in thread table
unsigned long long c_thr Offset to thread context table
unsigned long long c_segs Number of elements in segregion
unsigned long long c_segregion Offset to start of segregion table
unsigned long long c_stack Offset of user stack in file
unsigned long long c_stackorg Base address of user stack region
unsigned long long c_size Size of user stack region
unsigned long long c_data Offset to user data region
unsigned long long c_dataorg Base address of user data region
unsigned long long c_datasize Size of user data region
unsigned long long c_sdorg Base address of privately loaded region
unsigned long long c_sdsize Size of user privately loaded region
unsigned long long c_vmregions Number of anonymously mapped areas
unsigned long long c_vmm Offset of start of vm_infox table
struct thrdctx c_flt Faulting thread's context and thread data
struct userx c_u Representation of the user struct and process data

The c_flt field in the core dump contains the thrdctx structure of the faulting thread. The thrdctx structure includes the thread data and registers as they existed at the time of the fault. The format of the thread context structure is defined by thrdctx structure (in the core.h header file) as follows:

thrdctx thrdsinfo64
thread data (in procinfo.h header file)
state of registers if 64-bit process, or
state of registers if 32-bit process

The c_u field follows this information in the core dump. The c_u field contains the userx structure including the user structure fields, and the process data as they existed at the time of the fault. The format of the process information structure is defined by the userx structure (in the core.h header file) as follows:

userx procsinfo64 process data (in procinfo.h header file)

The ld_info structure and then the thrdctx structures of the other threads (if the process is multi-threaded) follow in the core dump.

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

The segregion structure contains the information about a shared memory region of the faulting process.

segregion addr
segment start address
size of the segment
type of the document

The first three fields of the core_dumpx header in AIX 4.3 are the same as that of the core_dump header in AIX 4.2. However, the c_entries are always zero on AIX 4.3 systems to distinguish them from the AIX 4.2 core file formats. Further, the pi_flags2 field of the procsinfo64 structure determines if the core file is of a 32-bit process or a 64-bit process.

The AIX 4.3 operating system can be forced to create core files in a AIX 4.2 core file format via the SMIT tool. However, this enforcement is valid only for 32-bit processes.

By default, the user data, anonymously mapped regions, and vm_infox structures are not included in a core dump. This partial core dump includes the current thread stack, the thread thrdctx structures, the user structure, 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 or setrlimit64 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 user data section, vm_infox, and anonymously mapped region structures are included in the core dump.

Related Information

The param.h file.

The adb command, dbx command.

The raise subroutine, setrlimit and setrlimit64 subroutines, 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 ]