Create Breakpoint Dialog Box: Code Tab

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.

Menu

Debug > Create Breakpoint...

Toolbar

Not available.

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:

linenumber or "filename":linenumber

A line number in the current source file or in the source file filename.

For example:

74

or

"source/foo.cpp":74

function or "filename"::function

or

"filename"::scope::function

or

scope::function

or

partial_scope::function

A function in the current source file or in the source file filename. You can click the Browse button to browse for a symbol. See also Symbol Selector Dialog Box: Simple Search Tab.

For example:

main

or

"src/foo.cpp":main

or

"src/foo.cpp":mynamespace::session::main

or

mynamespace::session::main

or

session::main

*address

An address.

For example:

*0x0000810C

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.

Note iconNote

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.

See Also


Submit feedback on this help topic

Copyright © 2001-2011, Intel Corporation. All rights reserved.