break (gdb mode only)

Set a breakpoint at a specified location.

Syntax

break [{func | line | *addr}] [if cond] [thread thread]

Parameters

func

The name of a function.

line

A line number in a source code file.

addr

An address.

cond

A conditional expression. Execution stops when the debugger hits the specified location and this condition evaluates to TRUE.

thread

A thread ID.

Description

This command sets a breakpoint.

Whenever the program execution hits a breakpoint, the debugger suspends execution and waits for a command.

You can set a breakpoint at the entry of a particular function or at a source code line.

If you do not specify any parameters, the debugger sets the breakpoint at the next instruction to be executed.

Example

(idb) break 200
Breakpoint 2 at 0x805197a: file src/x_list.cxx, line 200.
(idb) continue
Continuing.
Breakpoint 2, main () at src/x_list.cxx:200
200 CompoundNode* cNode2 = new CompoundNode(10.123, 5);

See Also


Submit feedback on this help topic

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