Set a breakpoint that stops program execution at a specific source code location.
The debugger remembers the breakpoint and stops the program execution every time the debugger reaches the specified location.
Debug > Create Breakpoint...
Type |
For the breakpoint type, select Breakpoint or Thread Syncpoint. Use thread syncpoints to synchronize a set of threads. |
||||||
Location |
This field is mandatory for breakpoints and thread syncpoints. Enter an expression into the Location field, or click Browse to browse a list of known symbols. See also Symbol Selector Dialog Box: Simple Search Tab. When the application reaches the expression, execution stops immediately. You can enter the following expressions into the Location field:
|
||||||
Condition |
When you define a condition, the debugger evaluates this condition when execution stops at the specified location. If the result is FALSE (zero), the application continues executing. In this case, an optional skip count remains unchanged. The condition can be any Boolean expression in the current language. For example: choice==2 |
||||||
Action |
If you want the debugger to execute a command when the program execution stops at a breakpoint, enter this command into the Action field. |
||||||
Continue |
When you check Continue, the application continues executing after the debugger processes the Actions list. Otherwise, it stops. |
||||||
Skip Count |
You can enter a positive integer as skip count number. The skip count defines the number of times a breakpoint hit is ignored. For example, a breakpoint with the skip number 2 would stop execution when encountered for the third time. First the debugger checks the condition, then the skip count number. |
||||||
Thread Filter |
The purpose of this field depends on the selected breakpoint type. It is mandatory for thread syncpoints. When you specify one or more threads or thread sets for a breakpoint, the program execution stops when any of the specified threads triggers the breakpoint. When you specify one or more threads or thread sets for a thread syncpoint, the breakpoint creates a thread barrier. When any thread in a thread set reaches this barrier, it is frozen, and the debugger ignores any attempt to step or continue execution, until all other threads in the thread set have reached the barrier. The program execution remains stopped at the breakpoint until you continue the program. If you manually stop execution before all threads in the thread set have reached the barrier, the debugger continues to hold all threads in the thread set until all of them reach the thread syncpoint. Specify thread IDs with integer values, as shown in the Threads window. Separate multiple thread IDs with commas. To specify thread sets, use the following syntax: t:[start_id:end_id]. Alternatively, click Browse to select one or more thread sets. |
||||||
Stopping Threads |
Enter the threads you want to be thawed when the breakpoint was hit and the possible action was performed, into the Stopping Threads field. | ||||||
OK, Cancel |
Click OK to create the breakpoint, or Cancel to cancel the operation. |
||||||
Apply |
If you want to set more than one breakpoint, click the Apply button to set a breakpoint and to leave the Set Breakpoint dialog box open. |
The breakpoint should be at the beginning of the line. For example, a breakpoint at source code line 100 stops the program after line 99 executes.
Copyright © 2001-2011, Intel Corporation. All rights reserved.