Oracle® Solaris Studio 12.4: Debugging a Program With dbx

Exit Print View

Updated: January 2015
 
 

Executing dbx Commands at a Line

A when breakpoint command accepts other dbx commands such as list, which means you can write your own version of trace.

(dbx) when at 123 {list $lineno;}

The when command operates with an implied cont command. In the example, after listing the source code at the current line, the program continues executing. If you included a stop command after the list command, the program would not continue executing.

For the complete syntax of the when command, see when Command. For detailed information on event modifiers, see Event Specification Modifiers.