BD(1)

NAME
bc, bd, be, bl, bp, bpa - breakpoint commands

SYNOPSIS
bp address-expression [DATAR|DATAW|IO [length]]

bpa address-expression [DATAR|DATAW|IO [length]]

bd breakpoint-number

bc breakpoint-number

be breakpoint-number

bl

DESCRIPTION
The bp command is used to establish a breakpoint. The address-expression may be a numeric value (decimal or hexidecimal), a symbol name, a register name preceeded by a percent symbol '%', or a simple expression consisting of a symbol name, an addition or subtraction character and a numeric value (decimal or hexidecimal).

The address-expression may also consist of a single asterisk '*' symbol which indicates that the command should operate on all existing breakpoints (valid only for bc, bd and be).

Three different types of breakpoints may be set:

Instruction
    Causes the kernel debugger to be invoked from the debug exception path when an instruction is fetched from the specified address. This is the default if no other type of breakpoint is requested.

DATAR
    Causes the kernel debugger to be entered when data of length length is read from or written to the specified address. This type of breakpoint must use a processor debug register thus placing a limit of four on the number of data and I/O breakpoints that may be established.

DATAW
    Enters the kernel debugger when data of length length is written to the specified address. length defaults to four bytes if it is not explicitly specified. Note that the processor will have already overwritten the prior data at the breakpoint location before the kernel debugger is invoked. The prior data should be saved before establishing the breakpoint, if required.

IO  Enters the kernel debugger when an in or out instruction targets the specified I/O address.

The bpa command will establish a breakpoint on all processors in an SMP system. This command is not available in an uniprocessor kernel.

The bd command will disable a breakpoint without removing it from the kernel debuggers breakpoint table. This can be used to keep more than 4 breakpoints in the breakpoint table without exceeding the processor breakpoint register count.

The be command will re-enable a disabled breakpoint.

The bc command will clear a breakpoint from the breakpoint table.

The bl command will list the existing set of breakpoints.

LIMITATIONS
Currently the kernel debugger does not use the int 03 method of establishing instruction breakpoints, so there may only be four active instruction and data breakpoints at any given time.

There is a compile time limit of sixteen entries in the breakpoint table at any one time.

ENVIRONMENT
The breakpoint subsystem does not currently use any environment variables.

SMP CONSIDERATIONS
Breakpoints which use the processor breakpoint registers are only established on the processor which is currently active. If you wish breakpoints to be universal use the 'bpa' command.

EXAMPLES

bp schedule
    Sets an instruction breakpoint at the begining of the function schedule.

bp schedule+0x12e
    Sets an instruction breakpoint at the instruction located at schedule+0x12e.

bp ttybuffer+0x24 dataw
    Sets a data write breakpoint at the location referenced by ttybuffer+0x24 for a length of four bytes.

bp 0xc0254010 datar 1
    Establishes a data reference breakpoint at address 0xc0254010 for a length of one byte.

bp  List current breakpoint table.

bd 0
    Disable breakpoint #0.