一、命令行构造
1. 基础用法
<noun> <verb> [-options [option-value]] [argument [argument...]]
2. 在某一行打下断点:
(lldb) breakpoint set --file foo.c --line 12
(lldb) breakpoint set -f foo.c -l 12
3. 在某个函数下打断点:
(lldb) breakpoint set --name foo
(lldb) breakpoint set -n foo
4. 在object-c下某个@selecter()选择器打下断点
(lldb) breakpoint set --selector alignLeftEdges:
(lldb) breakpoint set -S alignLeftEdges:
5.在某个特定可执行映像下断
(lldb) breakpoint set --shlib foo.dylib --name foo
(lldb) breakpoint set -s foo.dylib -n foo
6.lldb命令解释器对命令名称做了字符创最短唯一匹配:
(lldb) breakpoint set -n "-[SKTGraphicView alignLeftEdges:]"
(lldb) br s -n "-[SKTGraphicView alignLeftEdges:]"
7.指定某个文件下的某行
(lldb) breakpoint set --file foo.c --line 12
二、程序导入LLDB
用法lldb + 程序路径
$ lldb /Projects/Sketch/build/Debug/Sketch.app