| |||
| Home > Working with Breakpoints > Setting conditional breakpoints > Using the Simple Break if X, N times dialog box | |||
The Simple Break if X, N times dialog box, shown in Figure 5.11, enables you to set a conditional breakpoint that specifies how many times execution must arrive at the specified address before the breakpoint triggers. This dialog box provides a quick way of assigning the SW Pass Count qualifier to a breakpoint (see Specifying Qualifiers).
To display the Simple Break if X, N times dialog box (see Figure 5.11) use one of the following methods:
Select the following option from the Code window main menu:
Debug → Breakpoints → Conditional → Break if X, N times...
Right-click on the margin, an instruction, or line of source code in the File Editor pane, and select Set BreakIf... from the context menu. Then select Break if X, N times... from the List Selection dialog box, and click OK.
Using the Break/Tracepoints pane, either:
select Set BreakIf... from the Pane menu
right-click on the pane background, and select Set BreakIf... from the context menu.
Then select Break if X, N times... from the List Selection dialog box, and click OK.
Right-click on a value shown in the Watch pane, or on a variable shown in the Call Stack pane, and select BreakIf... from the context menu. Then select Break if X, N times... from the List Selection dialog box, and click OK.
The Simple Break if X, N times dialog box (see Figure 5.11) contains the following fields:
Choose the type of breakpoint that you want to set. The options are:
SW Instr
HW Instr
HW Access
HW Read
HW Write.
Specify the location where the breakpoint is to be set. This can be:
a specific line number in the source code, with or without a module name prefix (see Qualifying breakpoint line number references with module names)
a specific address or address range (see Specifying address ranges)
a function entry (see Specifying the entry point to a function).
The breakpoint unit triggers if the PC equals the corresponding
address, or falls within the specified address range. For example, Proc_4.
Alternatively, you can click the drop-down arrow to the right of these fields to choose the location from a list browser (see List browser dialog boxes), select from your personal Favorites List (see Favorites categories used by RealView Debugger features), or select from a list of previously-used expressions.
The number of times
execution must arrive at the specified address to trigger the breakpoint,
for example, when Proc_4 has been executed 150 times.
If you are using a debug target that supports it, the pass count can be made in hardware.