Sun ONE Directory Server Resource Kit 5.2 Tools Reference |
Chapter 28
The Core File Analyzer ToolThe viewldbg tool analyzes the contents of a memory dump file. This chapter provides instructions on how to use the tool. It contains the following sections:
OverviewThe viewldbg tool reads a core file and extracts information about the runtime execution path and data structures. A core file is a copy of the contents of a memory dump, produced when a process is aborted by internal error. The core file must be generated by an executable that was compiled to produce debugging information; it must also be given as input to the viewldbg command. It can be used to analyze runtime conditions and errors when developing applications with the Sun ONE LDAP SDK for C. The latest version of the tool is in the DSRK_base/bin/dsrk52 directory.
Note
The viewldbg tool is specific to the Solaris operating environment and only available on Solaris platform installations.
Command UsageThe viewldbg tool is identical to the viewcore tool released in version 5.0 of Sun ONE LDAP SDK for C; only the name has changed.
Syntax
The syntax of the viewldbg command on the command-line takes the following form:
viewldbg executableFile coreFile outputFile
Where:
- executableFile is the path and filename of the binary executable to debug, the one which produced the core file. This executable must be compiled with debugging options in order for analysis to be possible.
- coreFile is the path and filename of the core information from an executable. Core files may be generated automatically when executables crash or generated by the gcore command for a running executable. For more information, see the gcore(1) man page.
- outputFile is path and filename of a file where the viewldbg tool will write the result of the core analysis. An example of the output is reproduced in Command-Line Example.
Command-Line ExampleThe code reproduced in Code Example 28-1 is a sample of the output from the following commands:
$ viewldbg executableFile ./core ~/coreOutput.txt
$ cat ~/coreOutput.txt