lldb常用命令

306 阅读1分钟

quit //退出

b //输出断点信息

    事例:6: file = '/Users/yubing/Desktop/sdimage1/sdimage/ViewController.m', line = 45,    exact_match = 0, locations = 1, resolved = 1, hit count = 1 
      6.1: where = sdimage`-[ViewController btn:] + 42 at ViewController.m:45, address = 0x000000010807106a, resolved, hit count = 1 

b test //设置断点在test函数下

bt //打印栈信息

call//调用函数self.view.backgroundColor = [UIColor yellowcolor];

c //程序继续执行。

n //单步执行不进入子函数。

s //单步运行进入子函数。

si //汇编指令。

ni //汇编指令。

image //展示各种模块信息。

watchpoint //内存数据发生改变时触发。

mem读取0x7fbfe0d38240 0x7fbfe0d38240 + 90 //读出内存中的信息。

memory write 0x7fbfe0d38240 99 //把99写入内存。

register read //寄存器读取真机x1读取寄存器里边的内容模拟器eax(能获取参数和调用对象)。