Skip Navigation Links | |
Exit Print View | |
Oracle Solaris Studio 12.3: Debugging a Program With dbx Oracle Solaris Studio 12.3 Information Library |
4. Viewing and Navigating To Code
5. Controlling Program Execution
6. Setting Breakpoints and Traces
8. Evaluating and Displaying Data
11. Debugging Multithreaded Applications
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
Breakpoint Event Specifications
inmember function inmethod function
inclass classname [-recurse | -norecurse]
inobject object-expression [-recurse | -norecurse]
Data Change Event Specifications
access mode address-expression [, byte-size-expression]
dlopen [ lib-path ] dlclose [ lib-path ]
Execution Progress Event Specifications
Variables Valid for when Command
Variables Valid for when Command and Specific Events
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
Event management is based on the concept of a handler. The name comes from an analogy with hardware interrupt handlers. Each event management command typically creates a handler, which consists of an event specification and a series of side-effect actions. (See Setting Event Specifications.) The event specification specifies the event that will trigger the handler.
When the event occurs and the handler is triggered, the handler evaluates the event according to any modifiers included in the event specification. (See Event Specification Modifiers.) If the event meets the conditions imposed by the modifiers, the handler’s side-effect actions are performed (that is, the handler “fires”).
An example of the association of a program event with a dbx action is setting a breakpoint on a particular line.
The most generic form of creating a handler is by using the when command.
when event-specification {action; ... }
Examples in this chapter show how you can write a command (like stop, step, or ignore) in terms of when. These examples are meant to illustrate the flexibility of the when command and the underlying handler mechanism, but they are not always exact replacements.