LLDB調(diào)試
流程控制
*繼續(xù)
c continue *單步 n next
$ ni 按ctr 會進(jìn)入方法价涝。匯編單步
輸入OC代碼
p po
斷點(diǎn)所有名稱相同的方法
$ breakpoint -r 方法名
斷點(diǎn)列表
$list
回滾 - 滾動上一個,停止執(zhí)行下面的方法虐拓。
$ thread return
刪除一組斷點(diǎn)
$ delete
刪除所有斷點(diǎn)
$breakpoint delete
禁用某一個斷點(diǎn)
disable 2.2 啟動某一個斷點(diǎn)enable
設(shè)置斷點(diǎn)
*LocationService為類名
- share 為方法名
$breakpoint set -n "LocationService share"
給所有同名方法加斷點(diǎn)
$breakpoint set -r 方法名
內(nèi)存斷點(diǎn) p1為對象伊诵,name為屬性
watchpoint set variable p1->namewatchpoint set express
讀取內(nèi)存
$ memory read (x)
$register read 記存器
方法堆棧
$ bt
變量查詢
$frame variable
命令
斷點(diǎn)添加指令
$break command add 1
查看指令
$break command list 1
只對 breakpoint watchpoint 有效(debugview单绑,crash無效),每次stop都執(zhí)行一些命令
$target stop-hook add -o "frame variable"
$target stop-hook list
干掉某一組hook
$underplay 2
自建 lldb文件曹宴,輸入命令询张。重新運(yùn)行XCODE。
$image lookup -a 內(nèi)存地址浙炼,查找crash.
快速查看類
$image lookup -t 對象
查看庫
$image list
up 上一個調(diào)用方法down 下一個調(diào)用方法
x (memory load ) + 地址 dis 地址 (8位份氧,0x從右向左取值)
$ ni 下一步
xcode快捷鍵
command + shift + j 找到類的文件位置。
command + shift + y 收起控制臺弯屈。
command + . 暫停