[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Kernel Extensions and Device Support Programming Concepts

Watch Break Point Subcommands

Note
Watch break point subcommands are specific to the KDB Kernel Debugger. They are not available in the kdb command.

wr, ww, wrw, cw, lwr, lww, lwrw, and lcw Subcommands

A watch register can be used on the DABR Data Address Breakpoint Register or HID5 on PowerPC 601 RISC Microprocessor to enter KDB when a specified effective address is accessed. The register holds a double-word effective address and bits to specify load and store operation. The wr subcommand can be used to stop on a load instruction. The ww subcommand can be used to stop on store instruction. The wrw subcommand can be used to stop on a load or store instruction. With no argument, the subcommand prints the current active watch subcommand. The cw subcommand can be used to clear the last watch subcommand. These subcommands are global to all processors. The local subcommands lwr, lww, lwrw, and lcw allow establishing a watchpoint for a specific processor. If no size is specified, the default size is 8 bytes and the address is double word aligned. Otherwise KDB checks the faulting address with the specified range and continues execution if it does not match.

Note
These subcommands are only available within the KDB Kernel Debugger, they are not included in the kdb command.
Syntax

 

wr [[-e | -p | -v] Address [size]]

ww [[-e | -p | -v] Address [size]]

wrw [[-e | -p | -v] Address [size]]

cw

lwr [[-e | -p | -v] Address [size]]

lww [[-e | -p | -v] Address [size]]

lwrw [[-e | -p | -v] Address [size]]

lcw

It is possible to specify whether the address is physical, virtual, or effective with the -p, -v, and -e options. If the address type is not specified it is assumed to be an effective address.

Aliases:

Example

   KDB(0)> ww -p emulate_count set a data break point (physical address, write mode)
   KDB(0)> ww print current data break points
   CPU 0: emulate_count+000000 paddr=00238360 size=8 hit=0 mode=W
   CPU 1: emulate_count+000000 paddr=00238360 size=8 hit=0 mode=W
   KDB(0)> e exit the debugger
   ...
   Watch trap: 00238360 <emulate_count+000000>
   power_asm_emulate+00013C     stw    r28,0(r30)          r28=0000003A,0(r30)=emulate_count
   KDB(0)> ww print current data break points
   CPU 0: emulate_count+000000 paddr=00238360 size=8 hit=1 mode=W
   CPU 1: emulate_count+000000 paddr=00238360 size=8 hit=0 mode=W
   KDB(0)> wr sysinfo set a data break point (read mode)
   KDB(0)> wr print current data break points
   CPU 0: sysinfo+000000 eaddr=003BA9D0 vsid=00000000 size=8 hit=0 mode=R
   CPU 1: sysinfo+000000 eaddr=003BA9D0 vsid=00000000 size=8 hit=0 mode=R
   KDB(0)> e exit the debugger
   ...
   Watch trap: 003BA9D4 <sysinfo+000004>
   .fetch_and_add+000008   lwarx    r3,0,r6             r3=sysinfo+000004,r6=sysinfo+000004
   KDB(0)> cw clear data break points

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]