Debugging a Program With dbx
Forte Developer 7
816-2453-10
Contents |
Accessing Forte Developer Development Tools and Man Pages
Accessing Forte Developer Documentation
Accessing Related Solaris Documentation
Compiling Your Code for Debugging
Starting dbx and Loading Your Program
Debugging Your Program With dbx
Finding Memory Access Problems and Memory Leaks
Debugging a Core File in the Same Operating Environment
If Your Core File Is Truncated
Debugging a Mismatched Core File
Mapping the Compile-time Directory to the Debug-time Directory
Setting dbx Environment Variables
Creating Your Own dbx Commands
Compiling a Program for Debugging
Code Compiled Without the -g Option
Shared Libraries Require the -g Option for Full dbx Support
Killing a Program Without Terminating the Session
Saving and Restoring a Debugging Run
Saving a Series of Debugging Runs as Checkpoints
Saving and Restoring Using replay
Using the dbx Initialization File
Setting dbx Environment Variables
The dbx Environment Variables and the Korn Shell
4. Viewing and Navigating Through Code
Mapping to the Location of the Code
Relaxing the Scope Lookup Rules
Walking the Call Stack to Navigate Through Code
Qualifying Symbols With Scope Resolution Operators
C++ Double Colon Scope Resolution Operator
Printing a List of Occurrences of a Symbol
Determining Which Symbol dbx Uses
Viewing Variables, Members, Types, and Classes
Looking Up Definitions of Variables, Members, and Functions
Looking Up Definitions of Types and Classes
Debugging Without the Presence of .o Files
Listing Debugging Information for Modules
5. Controlling Program Execution
Attaching dbx to a Running Process
Continuing Execution of a Program
Using Ctrl+C to Stop a Process
6. Setting Breakpoints and Traces
Setting a stop Breakpoint at a Line of Source Code
Setting a stop Breakpoint in a Function
Setting Multiple Breaks in C++ Programs
Setting Data Change Breakpoints
Setting Filters on Breakpoints
Controlling the Speed of a Trace
Directing Trace Output to a File
Setting a when Breakpoint at a Line
Setting a Breakpoint in a Shared Library
Listing and Clearing Breakpoints
Listing Breakpoints and Traces
Deleting Specific Breakpoints Using Handler ID Numbers
Enabling and Disabling Breakpoints
Finding Your Place on the Stack
Walking the Stack and Returning Home
Displaying and Reading a Stack Trace
8. Evaluating and Displaying Data
Evaluating Variables and Expressions
Verifying Which Variable dbx Uses
Variables Outside the Scope of the Current Function
Printing the Value of a Variable, Expression, or Identifier
Turning Off Display (Undisplaying)
Assigning a Value to a Variable
Capabilities of Runtime Checking
Turning On Memory Use and Memory Leak Checking
Turning On Memory Access Checking
Turning On All Runtime Checking
Using Access Checking (SPARC Only)
Understanding the Memory Access Error Report
Understanding the Memory Leak Report
Using Suppression to Manage Errors
Using Runtime Checking on a Child Process
Using Runtime Checking on an Attached Process
Using Fix and Continue With Runtime Checking
Runtime Checking Application Programming Interface
Using Runtime Checking in Batch Mode
Enabling Batch Mode Directly From dbx
Runtime Checking's 8 Megabyte Limit
Modifying Source Using Fix and Continue
Changing Variables After Fixing
Fixing C++ Template Definitions
11. Debugging Multithreaded Applications
Understanding Multithreaded Debugging
Viewing the Context of Another Thread
Changing the Default Signal Lists
Automatically Handling Signals
Commands for Handling Exceptions
Examples of Exception Handling
15. Debugging Fortran Using dbx
Viewing Fortran 95 Derived Types
Pointer to Fortran 95 Derived Type
16. Debugging a Java Application With dbx
Capabilities of dbx With Java Code
Limitations of dbx With Java Code
Environment Variables for Java Debugging
Starting to Debug a Java Application
Debugging a Java Application That Has a Wrapper
Attaching dbx to a Running Java Application
Debugging a C Application or C++ Application That Embeds a Java Application
Passing Arguments to the JVM Software
Specifying the Location of Your Java Source Files
Specifying the Location of Your C Source Files or C++ Source Files
Specifying a Path for Class Files That Use Custom Class Loaders
Setting Breakpoints on Code That Has Not Yet Been Loaded by the JVM Software
Customizing Startup of the JVM Software
Specifying a Path Name for the JVM Software
Passing Run Arguments to the JVM Software
Specifying a Custom Wrapper for Your Java Application
Specifying 64-bit JVM Software
dbx Modes for Debugging Java Code
Switching from Java or JNI Mode to Native Mode
Switching Modes When You Interrupt Execution
Using dbx Commands in Java Mode
The Java Expression Evaluation in dbx Commands
Static and Dynamic Information Used by dbx Commands
Commands With Identical Syntax and Functionality in Java Mode and Native Mode
Commands With Different Syntax in Java Mode
Commands Valid Only in Java Mode
17. Debugging at the Machine-Instruction Level
Examining the Contents of Memory
Using the examine or x Command
Stepping and Tracing at Machine-Instruction Level
Single Stepping at the Machine-Instruction Level
Tracing at the Machine-Instruction Level
Setting Breakpoints at the Machine-Instruction Level
Setting a Breakpoint at an Address
18. Using dbx With the Korn Shell
ksh-88 Features Not Implemented
Rebinding of Editing Functions
19. Debugging Shared Libraries
Startup Sequence and .init Sections
Setting Breakpoints in Shared Libraries
Setting a Breakpoint in a Explicitly Loaded Library
Impacts of Running a Program Under dbx
Commands That Alter the State of the Program
Breakpoint Event Specifications
Data Change Event Specifications
Execution Progress Event Specifications
Variables Valid for when Command
Variables Valid for Specific Events
Setting Event Handler Examples
Setting a Breakpoint for Store to an Array Member
Enabling a Handler While Within a Function (in function)
Determining the Number of Lines Executed
Determining the Number of Instructions Executed by a Source Line
Enabling a Breakpoint After an Event Occurs
Resetting Application Files for replay
Copyright © 2002, Sun Microsystems, Inc. All rights reserved.