HOW TO LOAD A CORE FILE ON SOLARIS
dalla 270000SVT2 Visits (4634)
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.
On SOLARIS the debugger commonly used is 'dbx'. For 'dbx' to be able to locate the original objects you need to first set 'core_lo_pathmap' to let the debugger know that it has to look at your settings first rather than using the information provided by the core file headers. Second you have to set the libraries and object mappings to let the debugger know where to find each 'path' from the original machine on the local machine using 'pathmap' command. Also since after the copy from original to local machine can change dates you have to force 'dbx' to load the core file even if it shows as older that the executable and that can be done with the '-f' option on the 'debug' command.