前言
LLDB(Low Lever Debug)默认内置于Xcode中的动态调试工具。标准的LLDB提供了一组广泛的命令,只在与老版本的GDB命令兼容。除了使用标准的配置外,还可以很容易的自定义LLDB以满足实际需求。平时正常开发都是通过图形化界面设置断点,逆向调试中通过LLDB来设置断点操作。
常用命令
其实我们可以通过
breakpoint help
来查看常用的命令

- 设置断点breakpoint set -n "[类名 类名中的函数名]"
下多个函数
breakpoint set -n "[类名 类名中的函数名]" -n "[类名 类名中的函数名]"
breakpoint set -n "[KeSeeSettingVC viewDidLoad]"

2.查看所有断点 breakpoint list
breakpoint list

- 设置工程所有类的某个函数都打上断点
breakpoint set --selector viewDidLoad

- 给某个文件的函数设置断点
breakpoint set -file KeSeeSettingVC.m --selector viewDidLoad

- 设置工程所有函数中带有
"view"
都打上断点
breakpoint set -r view:

执行代码
1.expression可以简写 p
expression

可以看出来expression 打印出来的是一个指针可以在不重新编译代码的情况下动态改变变量的值节约了开发调试时间。
网友评论