Sun Java logo     Previous      Contents      Index      Next     

Sun logo
Sun ONE Directory Server Resource Kit 5.2 Tools Reference 

Chapter 28
The Core File Analyzer Tool

The 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:


The 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.


The viewldbg tool is specific to the Solaris™ operating environment and only available on Solaris platform installations.

Command Usage

The 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.


The syntax of the viewldbg command on the command-line takes the following form:

viewldbg executableFile coreFile outputFile


Command-Line Example

The 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

Code Example 28-1  Sample Output for viewldbg

Core analysis date. Copyright (c) 2000 Sun Microsystems, Inc.

Currently time

Opening executableFile ./core

architecture is SPARC

0: NOTE offset=0x1234 filesz=0x1234 flags=9 align=8

1: LOAD vaddr=0x0394 filesz=0x0948 memsz=0x0948 mode=RWX


Previous      Contents      Index      Next     

Copyright 2004 Sun Microsystems, Inc. All rights reserved.