zoukankan      html  css  js  c++  java
  • lldb使用

    常用 si,ni ,ex, mem,di,reg,b,c,x

    以下内容是lldb帮助文档中内容:

      apropos           -- List debugger commands related to a word or subject.

      breakpoint        -- Commands for operating on breakpoints (see 'help b' for

                           shorthand.)

      bugreport         -- Commands for creating domain-specific bug reports.

      command           -- 这 个可以 自定义命令

             command alias hp help.    用hp 替换help命令

      disassemble       --显示汇编代码 d di dis 等缩写都可以

      expression        -- 显示变 量的值

            ex    n

      frame            :

      info  用法 frame info 显示一些当前线程信息

      select     frame select 显示当前调试线程位置信息

      variable  frame var   显示当前调试线程局部变量信息

      kdp-remote        -- Connect to a process via remote KDP server.  If no UDP

                           port is specified, port 41139 is assumed.

      language          -- Commands specific to a source language.

      log               -- Commands controlling LLDB internal logging.

      memory            --操作当前进程内存
    
            mem read &result   读取变量result中的值
    
           
    
           mem read -c 100 &result 显示100字节

      platform          -- Commands to manage and create platforms.

      plugin            -- lldb插件管理

      process           -- Commands for interacting with processes on the current

                           platform.

      quit              -- 退出lldb

      register          -- 读写寄存器值

          

      script            -- Invoke the script interpreter with provided code and

                           display any results.  Start the interactive interpreter

                           if no code is supplied.

      settings          -- Commands for managing LLDB settings.

      source            -- 通过调试信息展示源文件信息

      target            -- Commands for operating on debugger targets.

      thread            -- Commands for operating on one or more threads in the

                           current process.

      type              -- Commands for operating on the type system.

      version           -- Show the LLDB debugger version.

      watchpoint        -- Commands for operating on watchpoints.

    Current command abbreviations (type 'help command alias' for more info):

      add-dsym  --增加符号表

      attach    -- 附加进程

      b      设置断点

      bt        显示当前栈信息,frame中有的命令功能相同

      c        继续运行当前进程中的所有线程

      call      直接调用表达示 比如 call 1+1

      continue  -- Continue execution of all threads in the current process.

      detach    -- Detach from the current target process.

      di          dis 显示反汇编代码      

      display   -- Evaluate an expression at every stop (see 'help target

                   stop-hook'.)

      down      -- Select a newer stack frame.  Defaults to moving one frame, a

                   numeric argument can specify an arbitrary number.

      env       -- Shorthand for viewing and setting environment variables.

      exit      -- 退出

      f         -- Select the current stack frame by index from within the current

                   thread (see 'thread backtrace'.)

      file      -- Create a target using the argument as the main executable.

      finish    -- Finish executing the current stack frame and stop after

                   returning.  Defaults to current thread unless specified.

      image     -- Commands for accessing information for one or more target

                   modules.

      j         -- Set the program counter to a new address.

      jump      -- Set the program counter to a new address.

      kill      -- Terminate the current target process.

      l         --显示源码

      list     

      n         源码级别单步

      next      -- Source level single step, stepping over calls.  Defaults to

                   current thread unless specified.

      nexti     -- Instruction level single step, stepping over calls.  Defaults to

                   current thread unless specified.

      ni        汇编级别单步

      p         -- Evaluate an expression on the current thread.  Displays any

                   returned value with LLDB's default formatting.

      parray    -- Evaluate an expression on the current thread.  Displays any

                   returned value with LLDB's default formatting.

      po        -- Evaluate an expression on the current thread.  Displays any

                   returned value with formatting controlled by the type's author.

      poarray   -- Evaluate an expression on the current thread.  Displays any

                   returned value with LLDB's default formatting.

      print     -- Evaluate an expression on the current thread.  Displays any

                   returned value with LLDB's default formatting.

      q         -- Quit the LLDB debugger.

      r         -- Launch the executable in the debugger.

      rbreak    -- Sets a breakpoint or set of breakpoints in the executable.

      repl      -- Evaluate an expression on the current thread.  Displays any

                   returned value with LLDB's default formatting.

      run       -- Launch the executable in the debugger.

      s         -- Source level single step, stepping into calls.  Defaults to

                   current thread unless specified.

      si        -- Instruction level single step, stepping into calls.  Defaults to

                   current thread unless specified.

      sif       -- Step through the current block, stopping if you step directly

                   into a function whose name matches the TargetFunctionName.

      step      -- Source level single step, stepping into calls.  Defaults to

                   current thread unless specified.

      stepi     -- Instruction level single step, stepping into calls.  Defaults to

                   current thread unless specified.

      t         -- Change the currently selected thread.

      tbreak    -- Set a one-shot breakpoint using one of several shorthand

                   formats.

      undisplay -- Stop displaying expression at every stop (specified by stop-hook

                   index.)

      up        -- Select an older stack frame.  Defaults to moving one frame, a

                   numeric argument can specify an arbitrary number.

      x         读内存地址

  • 相关阅读:
    长沙雅礼中学集训-------------------day1(内含day0)
    17年 5月份刷题版
    manecher_回文串;
    后缀数组
    湖南集训
    好像又好久没更了;计算课noip模拟赛;
    dp的练习题;
    oj1638
    【noi】植物大战僵尸
    #日常吐槽
  • 原文地址:https://www.cnblogs.com/fply/p/8425025.html
Copyright © 2011-2022 走看看