Subject : Using adb tips

Description :

여기에서는 adb에서 사용되는 주요한 command들에 대해 간단히 기술하고 있다.

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.


Revision History

작성일자 : 96.08.30
작성자 : 이민호

수정일자 :
수정자 :