LLDB

作者: East_Coast | 来源:发表于2019-12-30 15:01 被阅读0次

$ p self.view.backgroundColor = [UIColor redColor]  #执行表达式等同expression
$ po #打印对等同于expression -O
$ bt #打印堆栈信息等同于 thread backtrace
$ thread return #让函数直接返回某个值,不执行断点后面的代码
$ frame variable # 打印当前栈侦的变量
$ c #程序继续运行等同于 thread continue
$ n #单步执行,子函数当作整体一步执行 等同于 thread step-over
$ s # 单步执行,遇到子函数进入至函数 等同于 thread step-in
$ finish #执行完当前函数,返回上个函数等同于 thread step-out
$ si #指令集单步执行 stepi
$ ni #指令集单步执行 nexti
####断点
$ breakpoint set -a #加函数地址,给函数设置断点
$ breakpoint set -n '[ViewController touchesBegan:whithEvent:]' #加函数名 设置断点
$ breakpoint set -r #加正则表达式,设置断点
$ breakpoint set -s 动态库 -n 函数名 #给动态库的函数设置断点
$ breakpoint list #设置所有的断点
$ breakpoint disable #加断点编号,禁用断点
$ breakpoint enable #加断点编号,启用断点
$ breakpoint delete #加断点编号,删除断点
$ breakpoint command add 断点编号 #给断点预先添加执行命令,断点出发后执行,输入指令DONE结束输入
$ breakpoint command list 断点编号 #查看断点预设的执行命令
$ breakpoint command delete 断点编号 #删除断点预设的执行命令
####内存断点 在内存发生改变的时候触发
$ watchpoint set variable 变量名称 #watchpoint set variable self->age
$ watchpoint set expression 内存地址 # watchpoint set expression &(self->age)
$ watchpoint list 断点编号
$ watchpoint disable 断点编号
$ watchpoint enable 断点编号
$ watchpoint delete 断点编号
$ watchpoint command add 断点编号
$ watchpoint command list 断点编号
$ watchpoint command delete 断点编号
####模块查找 image lookup
$ image lookup -t 类型 #查看类型信息 image lookup -t ViewController
$ image lookup -a 内存地址 # 根据内存地址查找在模块中的位置
$ image lookup -n 符号或者函数名称 #查找符号或者函数名称的位置
$ image list #加载模块列表信息
$ image list -o -f #打印出模块的偏移地址、模块路径


相关文章

网友评论

      本文标题:LLDB

      本文链接:https://www.haomeiwen.com/subject/rjovictx.html