[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
Kernel Extensions and Device Support Programming Concepts

SMP Subcommands for the KDB Kernel Debugger and kdb Command

Note: The subcommands in this section are only valid for SMP machines.

KDB processor states are:


start and stop Subcommands

Note: This subcommand is only available within the kdb command; it is not included in the KDB Kernel Debugger.

The stop subcommand may be used to stop the specified processor. The start subcommand may be used to start the specified processor. MPC is used to test an incoming kdb subcommand. When the processor is stopped, it is looping inside KDB. Stopped means that the processor does not go back to AIX.

Example

   KDB(1)> stop 0 stop processor 0
   KDB(1)> cpu display processors status
   cpu 0 status VALID STOPPED action STOP
   cpu 1 status VALID DEBUG
   KDB(1)> start 0 start processor 0
   KDB(1)> cpu display processors status
   cpu 0 status VALID action START
   cpu 1 status VALID DEBUG
   KDB(1)> b sy_decint set break point
   KDB(1)> e exit the debugger
   Breakpoint
   .sy_decint+000000    mflr    r0                  <.dec_flih+000014>
   KDB(0)> cpu display processors status
   cpu 0 status VALID DEBUG action RESUME
   cpu 1 status VALID DEBUGWAITING
   KDB(0)> cpu 1 switch to processor 1
   Breakpoint
   .sy_decint+000000    mflr    r0                  <.dec_flih+000014>
   KDB(1)> cpu display processors status
   cpu 0 status VALID SWITCHED action SWITCH
   cpu 1 status VALID DEBUG
   KDB(1)> cpu 0 switch to processor 0
   KDB(0)> cpu display processors status
   cpu 0 status VALID DEBUG
   cpu 1 status VALID SWITCHED action SWITCH
   KDB(0)> q exit the debugger

cpu Subcommand

The cpu subcommand may be used to switch from the current processor to the specified processor. Without argument, the cpu subcommand prints processor status. The switched processor is blocked until next start or cpu subcommand. Switching between processors do not change processor state.

WARNING: If the selected processor can not be reached, it is possible to go back to the previous one by typing ^\\ twice.

Example

   KDB(4)> cpu display processors status
   cpu 0 status VALID SWITCHED action SWITCH
   cpu 1 status VALID SWITCHED action SWITCH
   cpu 2 status VALID SWITCHED action SWITCH
   cpu 3 status VALID SWITCHED action SWITCH
   cpu 4 status VALID DEBUG action RESUME
   cpu 5 status VALID SWITCHED action SWITCH
   cpu 6 status VALID SWITCHED action SWITCH
   cpu 7 status VALID SWITCHED action SWITCH
   KDB(4)> cpu 7 switch to processor 7
   Debugger entered via keyboard.
   .waitproc+0000B0     lbz    r0,0(r30)           r0=0,0(r30)=ppda+0014D0
   KDB(7)> cpu display processors status
   cpu 0 status VALID SWITCHED action SWITCH
   cpu 1 status VALID SWITCHED action SWITCH
   cpu 2 status VALID SWITCHED action SWITCH
   cpu 3 status VALID SWITCHED action SWITCH
   cpu 4 status VALID SWITCHED action SWITCH
   cpu 5 status VALID SWITCHED action SWITCH
   cpu 6 status VALID SWITCHED action SWITCH
   cpu 7 status VALID DEBUG
   KDB(7)> 

[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]