bp

bp[number]addr [count] ["cmds"]

The bp command creates a software breakpoint at an address. When the application is running, software breakpoints stop execution and force the debugger to execute the default or optional command string. Unlike breakpoints created by the g (Go) command, software breakpoints remain in memory until you remove them with the bc (Clear Breakpoints) command or temporarily disable them with the bd (Disable Breakpoints) command.

The debugger allows up to 10 software breakpoints (0 through 9). If you specify more than 10 breakpoints, the debugger returns the following message:

Too Many Breakpoints

The addr parameter is required for all new breakpoints.

Parameters

number

Specifies which breakpoint is being created. No space is allowed between the bp and number. If number is omitted, the first available breakpoint number is used.

addr

Specifies any valid instruction address—the first byte of an operation code (opcode).

count

Specifies the number of times the breakpoint is to be ignored before being executed. It can be any 16-bit value.

cmds

Specifies an optional list of debugger commands to be executed in place of the default command when the breakpoint is reached. You must enclose optional commands in quotation marks and separate optional commands with semicolons (;).

Example

The following example creates a breakpoint at address CS:123:

bp 123

The following example creates breakpoint 8 at address 400:23 and executes a db (Display Bytes) command:

bp8 400:23 "db DS:SI"

The following example creates a breakpoint at address 100 in the current CS selector and displays the registers before comparing a block of memory. The breakpoint is ignored 16 (10h) times before being executed.

bp 100 10 "r;c100 L 100 300"