天天看點

iOS Chisel指令

//聯系人:石虎  QQ: 1224614774 昵稱:嗡嘛呢叭咪哄

一、概念

英文版:

Debugger commands:

  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           -- Commands for managing custom LLDB commands.

  disassemble       -- Disassemble specified instructions in the current

                       target.  Defaults to the current function for the

                       current thread and stack frame.

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

                       any returned value with LLDB's default formatting.

  frame             -- Commands for selecting and examing the current thread's

                       stack frames.

  gdb-remote        -- Connect to a process via remote GDB server.  If no host

                       is specifed, localhost is assumed.

  gui               -- Switch into the curses based GUI mode.

  help              -- Show a list of all debugger commands, or give details

                       about a specific command.

  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            -- Commands for operating on memory in the current target

                       process.

  platform          -- Commands to manage and create platforms.

  plugin            -- Commands for managing LLDB plugins.

  process           -- Commands for interacting with processes on the current

                       platform.

  quit              -- Quit the LLDB debugger.

  register          -- Commands to access registers for the current thread and

                       stack frame.

  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            -- Commands for examining source code described by debug

                       information for the current target process.

  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  -- Add a debug symbol file to one of the target's current modules

               by specifying a path to a debug symbols file, or using the

               options to specify a module to download symbols for.

  attach    -- Attach to process by ID or name.

  b         -- Set a breakpoint using one of several shorthand formats.

  bt        -- Show the current thread's call stack.  Any numeric argument

               displays at most that many frames.  The argument 'all' displays

               all threads.

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

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

               returned value with LLDB's default formatting.

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

  detach    -- Detach from the current target process.

  di        -- Disassemble specified instructions in the current target. 

               Defaults to the current function for the current thread and

               stack frame.

  dis       -- Disassemble specified instructions in the current target. 

               Defaults to the current function for the current thread and

               stack frame.

  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      -- Quit the LLDB debugger.

  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 relevant source code using one of several shorthand

               formats.

  list      -- List relevant source code using one of several shorthand

               formats.

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

               current thread unless specified.

  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        -- Instruction level single step, stepping over calls.  Defaults to

               current thread unless specified.

  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         -- Read from the memory of the current target process.

Current user-defined commands:

  alamborder   -- Put a border around views with an ambiguous layout

  alamunborder -- Removes the border around views with an ambiguous layout

  binside      -- Set a breakpoint for a relative address within the

                  framework/library that's currently running. This does the

                  work of finding the offset for the framework/library and

                  sliding your address accordingly.

  bmessage     -- Set a breakpoint for a selector on a class, even if the class

                  itself doesn't override that selector. It walks the hierarchy

                  until it finds a class that does implement the selector and

                  sets a conditional breakpoint there.

  border       -- Draws a border around <viewOrLayer>. Color and width can be

                  optionally provided. Additionally depth can be provided in

                  order to recursively border subviews.

  caflush      -- Force Core Animation to flush. This will 'repaint' the UI but

                  also may mess with ongoing animations.

  dcomponents  -- Set debugging options for components.

  dismiss      -- Dismiss a presented view controller.

  fa11y        -- Find the views whose accessibility labels match labelRegex

                  and puts the address of the first result on the clipboard.

  flicker      -- Quickly show and hide a view to quickly help visualize where

                  it is.

  fv           -- Find the views whose class names match classNameRegex and

                  puts the address of first on the clipboard.

  fvc          -- Find the view controllers whose class names match

                  classNameRegex and puts the address of first on the

                  clipboard.

  hide         -- Hide a view or layer.

  mask         -- Add a transparent rectangle to the window to reveal a

                  possibly obscured or hidden view or layer's bounds

  mwarning     -- simulate a memory warning

  pa11y        -- Print accessibility labels of all views in hierarchy of

                  <aView>

  pa11yi       -- Print accessibility identifiers of all views in hierarchy of

                  <aView>

  pactions     -- Print the actions and targets of a control.

  paltrace     -- Print the Auto Layout trace for the given view. Defaults to

                  the key window.

  panim        -- Prints if the code is currently execution with a UIView

                  animation block.

  pbcopy       -- Print object and copy output to clipboard

  pblock       -- Print the block`s implementation address and signature

  pbundlepath  -- Print application's bundle directory path.

  pca          -- Print layer tree from the perspective of the render server.

  pcells       -- Print the visible cells of the highest table view in the

                  hierarchy.

  pclass       -- Print the inheritance starting from an instance of any class.

  pcomponents  -- Print a recursive description of components found starting

                  from <aView>.

  pcurl        -- Print the NSURLRequest (HTTP) as curl command.

  pdata        -- Print the contents of NSData object as string.

  pdocspath    -- Print application's 'Documents' directory path.

  pinternals   -- Show the internals of an object by dereferencing it as a

                  pointer.

  pinvocation  -- Print the stack frame, receiver, and arguments of the current

                  invocation. It will fail to print all arguments if any

                  arguments are variadic (varargs).

  pivar        -- Print the value of an object's named instance variable.

  pjson        -- Print JSON representation of NSDictionary or NSArray object

  pkp          -- Print out the value of the key path expression using

                  -valueForKeyPath:

  pmethods     -- Print the class and instance methods of a class.

  poobjc       -- Print the expression result, with the expression run in an

                  ObjC++ context. (Shortcut for "expression -O -l ObjC++ -- " )

  pproperties  -- Print the properties of an instance or Class

  present      -- Present a view controller.

  presponder   -- Print the responder chain starting from a specific responder.

  ptv          -- Print the highest table view in the hierarchy.

  pvc          -- Print the recursion description of <aViewController>.

  pviews       -- Print the recursion description of <aView>.

  rcomponents  -- Synchronously reflow and update root components found

                  starting from <aView>.

  setinput     -- Input text into text field or text view that is first

                  responder.

  settext      -- Set text on text on a view by accessibility id.

  show         -- Show a view or layer.

  slowanim     -- Slows down animations. Works on the iOS Simulator and a

                  device.

  taplog       -- Log tapped view to the console.

  unborder     -- Removes border around <viewOrLayer>.

  unmask       -- Remove mask from a view or layer

  unslowanim   -- Turn off slow animations.

  visualize    -- Open a UIImage, CGImageRef, UIView, or CALayer in Preview.app

                  on your Mac.

  vs           -- Interactively search for a view by walking the hierarchy.

  wivar        -- Set a watchpoint for an object's instance variable.

For more information on any command, type 'help <command-name>'.

調試器指令:

列出與一個單詞或主題相關的調試器指令。

斷點——在斷點上運作的指令(參見“幫助b”)

速記。)

bugreport——建立領域特定bug報告的指令。

指令——管理自定義LLDB指令的指令。

拆卸——在電流中拆卸指定的指令

目标。目前函數的預設值

目前線程和堆棧幀。

表達式——計算目前線程上的表達式。顯示

任何傳回值與LLDB的預設格式。

架構——選擇和檢查目前線程的指令

堆棧幀。

GDB - remote——通過遠端GDB伺服器連接配接到一個程序。如果沒有主機

是專門的,本地主機。

gui——切換到基于curses的gui模式。

幫助——顯示所有調試器指令的清單,或者給出詳細資訊

對一個特定的指令。

KDP - remote——通過遠端KDP伺服器連接配接到一個程序。如果沒有UDP

指定端口,假定端口41139。

語言——特定于源語言的指令。

日志——控制LLDB内部日志記錄的指令。

記憶體——在目前目标中操作記憶體的指令

的過程。

平台——管理和建立平台的指令。

插件——管理LLDB插件的指令。

程序——與目前程序互動的指令

平台。

退出——退出LLDB調試器。

寄存器——用于通路目前線程的寄存器的指令

堆棧幀。

腳本——用提供的代碼調用腳本解釋器

顯示任何結果。啟動互動式解釋器

如果沒有提供代碼。

設定——管理LLDB設定的指令。

源代碼——用于檢查由debug描述的源代碼的指令

目前目标流程的資訊。

目标——操作調試器目标的指令。

線程——在一個或多個線程上運作的指令

目前的過程。

類型——在類型系統上操作的指令。

版本——顯示LLDB調試器版本。

watchpoint——在觀察點上操作的指令。

目前的指令縮寫(為更多資訊輸入“幫助指令别名”):

Add - dsym——向目标的目前子產品添加一個調試符号檔案

通過指定路徑到一個調試符号檔案,或使用

指定一個子產品來下載下傳符号的選項。

附加——按ID或名稱附加到程序。

b——使用幾種簡寫格式之一設定斷點。

bt——顯示目前線程的調用堆棧。任何數值參數

顯示最多的幀數。參數顯示“所有”

所有線程。

c——繼續執行目前程序中的所有線程。

調用——評估目前線程上的表達式。顯示任何

傳回值與LLDB的預設格式。

繼續——繼續執行目前程序中的所有線程。

分離——脫離目前目标程序。

di——在目前目标中拆卸指定的指令。

目前線程的目前函數的預設值

堆棧幀。

dis——将目前目标中的指定指令分解。

目前線程的目前函數的預設值

堆棧幀。

顯示——在每一個站點上評估一個表達式(參見“幫助目标”)

stop-hook”。)

向下——選擇一個新的堆棧架構。預設移動一個幀,a

數字參數可以指定任意的數字。

env——檢視和設定環境變量的簡寫。

退出——退出LLDB調試器。

f——從目前的索引中選擇目前堆棧幀

線程(見“線程回溯”。)

檔案——使用參數作為主要可執行檔案建立目标。

完成——執行目前堆棧幀并在之後停止

傳回。預設目前線程,除非指定。

圖像——為一個或多個目标通路資訊的指令

子產品。

j——将程式計數器設定為一個新位址。

跳轉——将程式計數器設定為新位址。

殺死——終止目前的目标程序。

l——使用幾種速記法列出相關的源代碼

格式。

清單——使用幾種速記法列出相關的源代碼

格式。

n——源級單步,超越呼叫。預設為

目前線程,除非指定。

下一個——源級單步,超越呼叫。預設為

目前線程,除非指定。

nexti——指令級單步,超越呼叫。預設為

目前線程,除非指定。

ni——指令級單步,超越呼叫。預設為

目前線程,除非指定。

p——評估目前線程上的表達式。顯示任何

傳回值與LLDB的預設格式。

parray——評估目前線程上的表達式。顯示任何

傳回值與LLDB的預設格式。

po——評估目前線程上的表達式。顯示任何

傳回值與格式化控制的類型的作者。

poarray——評估目前線程上的表達式。顯示任何

傳回值與LLDB的預設格式。

列印——評估目前線程上的表達式。顯示任何

傳回值與LLDB的預設格式。

q——退出LLDB調試器。

r——在調試器中啟動可執行檔案。

rbreak——在可執行檔案中設定斷點或斷點。

repl——評估目前線程上的表達式。顯示任何

傳回值與LLDB的預設格式。

運作——在調試器中啟動可執行檔案。

源級單步,進入呼叫。預設為

目前線程,除非指定。

si——指令級單步,進入呼叫。預設為

目前線程,除非指定。

sif——跨過電流塊,如果你直接走,就停止

輸入與TargetFunctionName比對的函數。

步驟——源代碼級單步,進入調用。預設為

目前線程,除非指定。

stepi——指令級單步,進入呼叫。預設為

目前線程,除非指定。

t——更改目前選中的線程。

tbreak——使用幾種速記法設定一個一次性斷點

格式。

停止顯示——停止在每一個停止顯示的表達式(由stop- hook指定)

指數)。

向上——選擇一個較老的堆棧架構。預設移動一個幀,a

數字參數可以指定任意的數字。

x——讀取目前目标程序的記憶體。

二、中文版

目前使用者定義指令:

alamborder——在視圖上設定一個模糊的布局

alamunborder——用一個模糊的布局删除視圖的邊框

binside——為一個相對位址設定一個斷點

目前運作的架構/庫。這是

查找架構/庫的偏移量的工作

相應的滑動你的位址。

bmessage——為類上的選擇器設定斷點,即使類

它本身并不覆寫那個選擇器。它走的層次結構

直到它找到一個實作了選擇器的類

在那裡設定一個條件斷點。

邊界——在< viewOrLayer> >附近畫一條邊。顔色和寬度可以

(可選)。此外,還可以提供深度

指令遞歸地邊界子視圖。

caf郁郁蔥蔥——迫使核心動畫重新整理。這将“重新繪制”UI,但是

也可能會幹擾正在進行的動畫。

dcomponents——為元件設定調試選項。

解散——解散一個顯示的視圖控制器。

fa11y——找到可通路性标簽與labelRegex相比對的視圖

并将第一個結果的位址放在剪貼闆上。

閃爍——快速顯示并隐藏視圖,以快速幫助可視化

它是。

fv——查找類名比對classNameRegex和的視圖

将第一個位址放在剪貼闆上。

fvc——找到類名比對的視圖控制器

classNameRegex,并将第一個位址放在

剪貼闆。

隐藏——隐藏視圖或圖層。

掩碼——在視窗中添加一個透明的矩形,以顯示a

可能隐藏的或隐藏的視圖或層的邊界

mwarning——模拟記憶體警告

pa11y——列印可通路性标簽的所有視圖的層次結構

<一覽>

pa11yi——在層次結構中列印可通路性辨別符

<一覽>

pactions——列印控件的操作和目标。

paltrace——列印給定視圖的自動布局跟蹤。預設為

關鍵的視窗。

panim——如果代碼是目前執行的UIView

動畫塊。

列印對象和複制輸出到剪貼闆

pblock——列印塊的實作位址和簽名

pbundlepath——列印應用程式的bundle目錄路徑。

pca——從渲染伺服器的角度來列印層樹。

pcells——列印在最高的表視圖中可見的單元格

層次結構。

pclass——從任何類的執行個體開始列印繼承。

pcomponents——列印建立的元件的遞歸描述

從<一覽>。

pcurl——将NSURLRequest(HTTP)列印為curl指令。

pdata——将NSData對象的内容作為字元串列印出來。

pdocspath——列印應用程式的“文檔”目錄路徑。

pinternals——通過取消它作為一個對象來顯示一個對象的内部

指針。

p調用——列印目前的堆棧幀、接收器和參數

調用。如果有的話,它将無法列印所有的參數

參數是可變的(可變參數)。

pivar——列印對象的命名執行個體變量的值。

pjson—NSDictionary或NSArray對象的列印JSON表示

pkp——列印關鍵路徑表達式的值

-valueForKeyPath:

pmethods——列印類的類和執行個體方法。

poobjc——列印表達式結果,用表達式運作

ObjC + +上下文。(“表達式- o - l ObjC + +”的快捷方式)

pproperties——列印執行個體或類的屬性

present——呈現一個視圖控制器。

預發器——從特定的響應器開始列印響應程式鍊。

ptv——在層次結構中列印最高的表視圖。

pvc——列印< aViewController >的遞歸描述。

pviews——列印< aView >的遞歸描述。

rcomponents——同步回流和更新根元件

從<一覽>。

将輸入文本輸入文本字段或文本視圖

應答器。

settext——可通路id在文本上設定文本。

顯示——顯示視圖或層。

慢化——減慢動畫。在iOS模拟器和a上工作

裝置。

taplog——登入到控制台。

unborder—删除< viewOrLayer >的邊框。

unmask——從視圖或層中删除掩碼

unslowanim——關掉慢速動畫。

可視化——在預覽。app中打開UIImage,CGImageRef,UIView或CALayer

在你的Mac。

vs——通過周遊層次結構來互動地搜尋視圖。

wivar——為對象的執行個體變量設定一個觀察點。

有關任何指令的更多資訊,鍵入“幫助<指令名>”。

(lldb)

謝謝!!!