dc and dpc subcommands

The dc and dpc subcommands decode instructions.

Format

dc effectiveaddress [count]

dpc physicaladdress [count]

Parameters

Item Description
effectiveaddress Specifies the effective or virtual address of the code to disassemble. Symbols, hexadecimal values, or hexadecimal expressions can be used in specification of the address.
physicaladdress Specifies the physical or real address of the code to disassemble. Symbols, hexadecimal values, or hexadecimal expressions can be used in specification of the address.
count Indicates the number of instructions to be disassembled. The value specified must be a decimal value or decimal expression.

Other

dpc has no aliases.

Examples

The following is an example of how to use the dc and the dpc subcommands:

   KDB(0)> set 4  
   power_pc_syntax is true
   KDB(0)> dc resume_pc 10  //prints 10 instructions
   .resume_pc+000000     lbz    r0,3454(0)          3454=Trconflag
   .resume_pc+000004  mfsprg    r15,0
   .resume_pc+000008    cmpi    cr0,r0,0
   .resume_pc+00000C     lwz    toc,4208(0)         toc=TOC,4208=g_toc
   .resume_pc+000010     lwz    r30,4C(r15)
   .resume_pc+000014     lwz    r14,40(r15)
   .resume_pc+000018     lwz    r31,8(r30)
   .resume_pc+00001C     bne-   cr0.eq,<.resume_pc+0001BC>
   .resume_pc+000020     lha    r28,2(r30)
   .resume_pc+000024     lwz    r29,0(r14)
   KDB(0)> dc mttb 5  //prints mttb function
   .mttb+000000      li    r0,0
   .mttb+000004   mttbl  X r0  //X shows that these instructions
   .mttb+000008   mttbu  X r3  //are not supported by the current architecture
   .mttb+00000C   mttbl  X r4  //POWER PC 601 processor
   .mttb+000010     blr
   KDB(0)> set 4  //set toggle for POWER family RS syntax
   power_pc_syntax is false
   KDB(0)> dc resume_pc 10  //prints 10 instructions
   .resume_pc+000000     lbz    r0,3454(0)          3454=Trconflag
   .resume_pc+000004   mfspr    r15,110
   .resume_pc+000008    cmpi    cr0,r0,0
   .resume_pc+00000C       l    toc,4208(0)         toc=TOC,4208=g_toc
   .resume_pc+000010       l    r30,4C(r15)
   .resume_pc+000014       l    r14,40(r15)
   .resume_pc+000018       l    r31,8(r30)
   .resume_pc+00001C     bne    cr0.eq,<.resume_pc+0001BC>
   .resume_pc+000020     lha    r28,2(r30)
   .resume_pc+000024       l    r29,0(r14)

   KDB(4)> dc scdisk_pm_handler
   .scdisk_pm_handler+000000     stmw    r26,FFFFFFE8(stkp)
   KDB(4)> tr scdisk_pm_handler
   Physical Address = 1D7CA1C0
   KDB(4)> dpc 1D7CA1C0
   1D7CA1C0     stmw    r26,FFFFFFE8(stkp)