SunSolve Internal

Infodoc ID   Synopsis   Date
4104   Using adb tips   27 Mar 2000

Description Top

Here is a brief description of some commands to use in adb.

adb program corefile            examine program and corefile
        adb program                     examine program
        adb - corefile                  examine corefile
        adb                             examine a.out


        addr,n?format       examine part of program (use for instrs.)
        addr,n/format           examine part of corefile (use for data)
        ?l value                locate 2-byte value
        ?L value                locate 4-byte value
        =  print .
        addr:b                  set breakpoint
        addr,n:b cmd            stops on nth occurance, and executes cmd.
        :s                      step
        addr:d                  delete breakpoint
        :r                      run
       ,n:r                    run, skip first n breakpoints
        :c                      continue
        addr:c                  continue from new addr.
        :k                      kill program
        $c                      backtrace
        $C                      backtrace plus local variables
        $r                      dump registers plus instr. at pc
        $e                      dump all externs
        $b                      list breakpoints
        $q                      quit
      ;                       command seperator
        !                       shell escape


        addr may be an expression:
                name    variable name
                f.name  function argument
                +       add
                -       subtract
                *       multiply
                /       divide
                %       integer divide
                &       and
                |       or
                #       round up
                ~       not

        formats are a combination of:
                b       octal bytes
                c       characters
                o       octal words
                d       decimal words
                f       float
                i       instructions
                sstring
                a       the value of the current address
                u       unsigned int
                n       newline
                r       blank space
                ^       --.
                +       ++.
        capital letters are long words
 
        ex:

        main,10?ai      prints the address and instruction of the first 10
                        instructions.
        tab,3/2X3d      prints 2 hex values, 3 decimals and repeats two
                        more times.


Note: last document update 1996
Bug ID n/a
Patch ID n/a
Product Area Kernel
Product adb/kadb
OS any
Release n/a
Hardware All

Top

SunWeb Home SunWeb Search SunSolve Home Simple Search

Sun Proprietary/Confidential: Internal Use Only