| |||
| Home > Controlling the Behavior of Breakpoints > Setting a breakpoint that depends on the result of an expression > Procedure when using the generic breakpoint dialog box | |||
To delay the activation of a breakpoint until an expression is either true or false:
Open the Create Breakpoint or Edit Breakpoint dialog box as appropriate.
Click More... on the breakpoint dialog box you are using. The breakpoint behavior controls are displayed. Figure 12.14 shows an example.
Click Add in the Conditions group. The Add Condition dialog box is displayed. Figure 12.15 shows an example.
Select the required expression condition:
When Expression True, to delay activation until an expression is true
When Expression False, to delay activation until an expression is false.
Enter the required expression to be tested before the breakpoint is to activate.
If you specify a variable, then it must be in scope when the breakpoint is hit.
For example, enter loop_count>=5 & loop_count<10:
When used to test for a True condition, the breakpoint
activates only when loop_count has values from
five to nine.
When used to test for a False condition, the breakpoint
activates only when loop_count has values from
one to four and greater than nine.
Click OK to close the Add Condition dialog box. The condition is added to the breakpoint conditions list.
Click OK to set the conditional breakpoint and close the breakpoint dialog box you are using.
The breakpoint is identified by a yellow disc.
Setting an unconditional breakpoint with specific attributes
the following in the RealView Debugger Command Line Reference Guide: