下面是来自lldb控制台中help命令的输出,自定义命令部分是来自chisel这个库的。做了一下简单翻译和说明。方便以后查阅。
For more information on any command, type 'help <command-name>'.
-
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. 创建特定领域bug报告单的命令 =.= 会生成详细的当前状态描述,应该是用于跟别人交流共同解决bug
-
command -- Commands for managing custom LLDB commands. 管理自定义的lldb命令
-
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.在当前线程执行一个表达式,使用lldb默认格式展示任何返回结果
-
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. 退出LLDB调试器
-
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. 管理LLDB的设置
-
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. 展示LLDB调试器版本
-
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. 在当前线程执行一个表达式,使用LLDB默认的格式展示所有返回结果。
- 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, anumeric 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: (define by chisel)
当前用户自定义命令
-
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.在View或layer 上绘制一个边界。颜色宽度可以作为可选项提供。为了递归添加子View边界层次可以提供。
-
caflush -- Force Core Animation to flush. This will 'repaint' the UI but also may mess with ongoing animations. 强制核心动画刷新。这将重新绘制UI界面。但也可能打乱正在进行的动画
-
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. 通过正则匹配类名来查找一个View,并且把第一个地址放在剪切板上。
-
fvc -- Find the view controllers whose class names match classNameRegex and puts the address of first on the clipboard. 通过正则匹配类名来查找一个ViewController,并且把第一个地址放在剪切板上。
-
hide -- Hide a view or layer. 隐藏一个view或layer
-
mask -- Add a transparent rectangle to the window to reveal a possibly obscured or hidden view or layer's bounds 在窗口中添加一个透明矩形,以显示模糊或者隐藏的view和layer的边界。
-
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. 打印NSControl的目标和动作
-
paltrace -- Print the Auto Layout trace for the given view. Defaults to the key window. 打印给定view的自动布局路径,默认view是keywindow。
-
panim -- Prints if the code is currently execution with a UIView animation block. 打印正在运行的UIView动画block
-
pbcopy -- Print object and copy output to clipboard 打印对象并且拷贝输出到剪切板
-
pblock -- Print the block`s implementation address and signature 打印block的实现地址和签名
-
pbundlepath -- Print application's bundle directory path. 打印应用bundle目录地址
-
pca -- Print layer tree from the perspective of the render server.
-
pcells -- Print the visible cells of the highest table view in the hierarchy. 打印最高层的tableview的可见cell
-
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. 打印NSURLRequest对应的curl命令
-
pdata -- Print the contents of NSData object as string. 打印NSData对应的字符串
-
pdocspath -- Print application's 'Documents' directory path. 打印应用的Documents目录路径
-
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). 只支持32位系统模拟器和macOS
-
pivar -- Print the value of an object's named instance variable.
-
pjson -- Print JSON representation of NSDictionary or NSArray object 使用json格式打印字典或数组
-
pkp -- Print out the value of the key path expression using -valueForKeyPath: 使用kvc打印一个值
-
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. 呈现一个viewcontroller
-
presponder -- Print the responder chain starting from a specific responder. 打印给定的响应者开始的响应链
-
ptv -- Print the highest table view in the hierarchy. 打印最高层tableview
-
pvc -- Print the recursion descriedtion of <aViewController>. 递归打印控制器描述
-
pviews -- Print the recursion description of <aView>. 递归打印view及子view的描述
-
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. 显示一个view或者layer
-
slowanim -- Slows down animations. Works on the iOS Simulator and a device. 慢速动画,在模拟器和真机中都有效
-
taplog -- Log tapped view to the console. 打印一个view的点击事件
-
unborder -- Removes border around <viewOrLayer>. 移除边界
-
unmask -- Remove mask from a view or layer 从一个view或layer移除mask
-
unslowanim -- Turn off slow animations. 关闭慢速动画
-
visualize -- Open a UIImage, CGImageRef, UIView, or CALayer in Preview.app on your Mac. 使用预览应用打开UIImage、CGImageRef、UIView、CaLayer等类的截图
-
vs -- Interactively search for a view by walking the hierarchy. 交互式view视图树搜索
-
wivar -- Set a watchpoint for an object's instance variable. 给一个对象中变量添加一个查看点