JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Studio 12.3: Debugging a Program With dbx     Oracle Solaris Studio 12.3 Information Library
search filter icon
search icon

Document Information

Preface

1.  Getting Started With dbx

2.  Starting dbx

3.  Customizing dbx

4.  Viewing and Navigating To Code

5.  Controlling Program Execution

6.  Setting Breakpoints and Traces

Setting Breakpoints

Setting a stop Breakpoint at a Line of Source Code

Setting a stop Breakpoint in a Function

Setting Multiple Breaks in C++ Programs

Setting Breakpoints in Member Functions of Different Classes

Setting Breakpoints in All Member Functions of a Class

Setting Multiple Breakpoints in Nonmember Functions

Setting Breakpoints in Objects

Setting Data Change Breakpoints

Stopping Execution When an Address Is Accessed

Stopping Execution When Variables Change

Stopping Execution on a Condition

Setting Filters on Breakpoints

Using the Return Value of a Function Call as a Filter

Setting Data Change Breakpoints on Local Variables

Using a Filter With a Conditional Event

Tracing Execution

Setting a Trace

Controlling the Speed of a Trace

Directing Trace Output to a File

Setting a when Breakpoint at a Line

Setting Breakpoints in Dynamically Loaded Libraries

Listing and Clearing Breakpoints

Listing Breakpoints and Traces

Deleting Specific Breakpoints Using Handler ID Numbers

Enabling and Disabling Breakpoints

Efficiency Considerations

7.  Using the Call Stack

8.  Evaluating and Displaying Data

9.  Using Runtime Checking

10.  Fixing and Continuing

11.  Debugging Multithreaded Applications

12.  Debugging Child Processes

13.  Debugging OpenMP Programs

14.  Working With Signals

15.  Debugging C++ With dbx

16.  Debugging Fortran Using dbx

17.  Debugging a Java Application With dbx

18.  Debugging at the Machine-Instruction Level

19.  Using dbx With the Korn Shell

20.  Debugging Shared Libraries

A.  Modifying a Program State

B.  Event Management

C.  Macros

D.  Command Reference

Index

Chapter 6

Setting Breakpoints and Traces

When an event occurs, dbx allows you to stop a process, execute arbitrary commands, or print information. The simplest example of an event is a breakpoint. Examples of other events are faults, signals, system calls, calls to dlopen(), and data changes.

A trace displays information about an event in your program, such as a change in the value of a variable. Although a trace’s behavior is different from that of a breakpoint, traces and breakpoints share similar event handlers (see Event Handlers).

This chapter describes how to set, clear, and list breakpoints and traces. For complete information on the event specifications you can use in setting breakpoints and traces, see Setting Event Specifications.

This chapter is organized into the following sections: