User`s guide
60
Chapter 6: Controlling Program Execution
Each breakpoint is assigned a number when you create it. Use this number
to reference a breakpoint in the various commands provided for
manipulating breakpoints (for example, disable, enable, and delete, all
described in “Managing Breakpoints, Traces, and Conditional Commands”
on page 70).
Setting Unconditional Breakpoints
To set an unconditional breakpoint, you simply specify the point at which
you want to stop program execution, using one of the following forms of the
stop command:
stop at Sets a breakpoint at the current source line.
stop at line Sets a breakpoint at the specified source line in the current
source file.
stop in procedure
Sets a breakpoint to stop execution upon entering the
specified procedure.
stop at file:line
Sets a breakpoint in the specified file at the specified line.
Caution: If your program has multiple source files, be sure to set the
breakpoint in the correct file. To do so, you can explicitly set the source file
using dbx’s file command (see “Changing Source Files” on page 15), or you
can use the func command to go to a source file containing a specified
function (see “Moving to a Specified Procedure” on page 50).
Setting Conditional Breakpoints
An unconditional breakpoint is the simplest type of breakpoint; your
program stops every time it reaches a specified place. On the other hand, a
conditional breakpoint stops your program only if a condition that you
specify is true. The two conditions that you can test are:
• Has the value of a variable or other memory location changed?
• Is a test expression true?