b subcommand
The b subcommand sets a permanent global breakpoint in the code. KDB kernel debugger checks whether a valid instruction is trapped.
Note: This subcommand is only available within the KDB kernel
debugger. It is not included in the kdb command.
Format
b [-p | -v] [ address]
Parameters
Item | Description |
---|---|
-p | Indicates that the breakpoint address is a physical or real address. |
-v | Indicates that the breakpoint address is a effective or virtual address. |
address | Specifies the address of the breakpoint. This may either be a physical address or a virtual address. Symbols, hexadecimal values, or hexadecimal expressions can be used to specify the address. |
If an invalid instruction is detected, a warning message is displayed. If the warning message is displayed, the breakpoint should be removed; otherwise, memory can be corrupted.
Other
brk
Examples
The following example is before VMM setup:
KDB(0)> b vsi //set break point on vsi()
.vsi+000000 (real address:002AA5A4) permanent & global
KDB(0)> e //exit debugger
...
Breakpoint
.vsi+000000 stmw r29,FFFFFFF4(stkp) <.mainstk+001EFC>
r29=isync_sc1+000040,FFFFFFF4(stkp)=.mainstk+001EFC
The following example is after VMM setup:
KDB(0)> b //display current active break points
No breakpoints are set.
KDB(0)> b 0 //set break point at address 0
WARNING: break point at 00000000 on invalid instruction (00000000)
00000000 (sid:00000000) permanent & global
KDB(0)> c 0 //remove break point at address 0
KDB(0)> b vmvcs //set break point on vmvcs()
.vmvcs+000000 (sid:00000000) permanent & global
KDB(0)> b i_disable //set break point on i_disable()
.i_disable+000000 (sid:00000000) permanent & global
KDB(0)> e //exit debugger
...
Breakpoint
.i_disable+000000 mfmsr r7 <start+001008> r7=DEADBEEF
KDB(0)> b //display current active break points
0: .vmvcs+000000 (sid:00000000) permanent & global
1: .i_disable+000000 (sid:00000000) permanent & global
KDB(0)> c 1 //remove break point slot 1
KDB(0)> b //display current active break points
0: .vmvcs+000000 (sid:00000000) permanent & global
KDB(0)> e //exit debugger
...
Breakpoint
.vmvcs+000000 mflr r10 <.initcom+000120>
KDB(0)> ca //remove all break points