bp

Sets a breakpoint, removes a breakpoint, or lists the current breakpoints.

Syntax

bp

bp [-{hw|sw|auto}] {<func>|[<ms>:]<addr>|<file> <line> [<column>]}

bp [-{hw|sw|auto}] {<file> <line> [<function>] [column]}

bp all|#<id>|#<id.instance>|<func>|<addr> off|enable|disable|{ignore <count>}

bp #<id> cond <c-expr>

Examples

The following table lists and defines examples of the bp command.

Table 1. bp Command-line debugger command - Examples
Command Description
bp Lists all breakpoints.
bp -hw fn Sets hardware breakpoint at function fn().
bp -auto file.cpp 101 1 Sets an auto breakpoint on file file.cpp at line 101, column 1.
bp -auto file.cpp 101 "int foo<int>()" 1 Sets an auto breakpoint on file file.cpp at line 101 on function template instance " int foo<int>() ", column 1.
bp fn off Removes the breakpoint at function fn().
bp 10343 Sets a breakpoint at memory address 10343.
bp #4 off Removes the breakpoint number 4.
bp #4 disable Disables the breakpoint number 4.
bp #4 ignore 3 Sets ignore count to 3 for breakpoint number 4.
bp #4 cond x == 3 Sets the condition for breakpoint number 4 to fire only if x == 3.
bp #4.1 off Removes the breakpoint instance number 4.1.
bp #4.1 ignore 3 Sets ignore count to 3 for breakpoint instance number 4.1.
bp #4.1 cond x == 3 Sets the condition for breakpoint instance number 4.1 to fire only if x == 3.