常用lldb命令
ChenghuiBai Lv3
常用

bt:堆栈信息
p:打印对象信息,内容比较全
po:打印对象信息
breakpoint set -n “-[方法名]”:断点
si:下一指令,汇编级别
s:下一步,高级源码级别
call:方法调用
thread return:退出当前线程
expression -O — self.view :打印当前对象内容,可以看见属性

打印,修改,方法调用

p 对象/表达式
po 对象
expression 表达式
call 方法
print 对象

线程

1、流程控制

thread step-in => s
thread step-out => n
thread step-over => finish
thread continue

2、堆栈信息

thread backtrace => bt 打印当前堆栈信息
bt 1 只打印一帧

3、跳帧选择N,调到第N帧

frame select N

4、查看帧变量
frame variable

5、线程返回

thread return 不带返回值
thread return 10 返回值为10

断点

breakpoint set -n “方法”
breakpoint delete 断点编号
breakpoint list

image

image lookup -t 类名
image lookup -a 地址

  • Post title:常用lldb命令
  • Post author:ChenghuiBai
  • Create time:2018-12-19 12:13:11
  • Post link:https://baichenghui.github.io/2018/12/19/常用lldb命令/
  • Copyright Notice:All articles in this blog are licensed under BY-NC-SA unless stating additionally.