IBM Support

HOW TO LOAD A CORE FILE ON AIX

Technical Blog Post


Abstract

HOW TO LOAD A CORE FILE ON AIX

Body

A core file is the image of a process' memory but does not contain some of the information a debugger needs to work properly. Some of those information are for example the 'symbol table' and the 'instructions'.

 

Both executable and loaded objects (dynamic libraries) have each their own set of instructions and symbols. The libraries, especially system ones, used by the process on the machine where the core file comes from might be different from the ones used on the machine where the core file is to be analyzed. As well the path of those libraries might be different on both machines.

 

For the debugger to work properly the core file, the executable but also all the loaded objects from the original machine should be copied to the machine where the core file is to be examined. Then some extra steps are required to let the debugger know where to find those original libraries and objects.

 

The debugger on AIX is 'dbx'. Because of the change of dates on files after transferring from original machine to local machine it might happen that the core file shows up as older than the executable. To force the debugger to still load the core file you have to use the '-v' option. For telling the debugger where to find the original libraries on the local machine you have to use the '-p' option to remap old path to new one. Multiple mappings can coexist on the same command line as shown in the example below:

 

Example:

 

    [/data1/dalla/92056.250.631] ls -l
    -rw-r--r--    1 dalla    build    13952229538 Dec 20 20:46 mycore

    [/data1/dalla/92056.250.631] ulimit -m unlimited
    [/data1/dalla/92056.250.631] ulimit -d unlimited
    [/data1/dalla/92056.250.631] dbx -v -p /opt/IBM/db2/V10.1/=/home3/dalla/sqllib/:/nodes/db2home/db2proj/sqllib/=/home3/dalla/sqllib/ /home3/dalla/sqllib/adm/db2sysc mycore

 

 

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

UID

ibm13286455