iOS - 学习笔记 - LLDB

2020-06-11  本文已影响0人  GA_
breakpoint set -n test
breakpoint set -n "-[UIVeiwController touchesBegan:withEvent:]"
    test方法设置断点

breakpoint set -r est
    -r 正则 包含est的都加断点

breakpoint set -s 动态库 -n 函数名
    给哪个动态库的哪个函数加断点

breakpoint list 
    查看断点

breakpoint disable 断点编号
    禁止断点

breakpoint enable 断点编号
    启动断点

breakpoint delete 断点编号
    删除断点
watchpoint set variable 变量名

watchpoint set varibale self->age

    注意:->

watchpoint set expression 0x********

watchpoint set expression &self->_age

watchpoint list 

watchpoint disable 断点编号

watchpoint enable 断点编号

watchpoint delete 断点编号

watchpoint command add 断点编号

watchpoint command list 断点编号

watchpoint command delete 断点编号

p &self->_age

查看内存地址值

缩写:x + 地址值
x/数量格式字节 + 地址值

x/3xg + 地址值
    打印3串16进制8字节

格式
x是16进制 f是浮点 d是10进制

字节大小
b:byte 1字节 h:half word 2字节 w:word 4字节 g:giant word 8字节

memory write 内存地址 数量

help breakpoint 

help set 

help -n 
expression self.view.backgroundColor = [UIColor yellowColor];

expression self 

expression self.view 

expression array 

expression -O -- array
expression self

po self 

call self 

p self 
thread backtrace  
    一个frame 代表一针 一针代表一个函数
    缩写:bt

thread return 

    断点处函数立刻返回

查看所有环境变量

782E7D18-45E1-49CC-8A27-EE409907A211.png
thread continue
    程序继续执行
    缩写:continue、c

thread step-over 
    单步执行 遇见函数会过掉
    缩写:next、n
    源码级别的

thread step-in  
    单步执行 遇见函数会进入
    缩写:step、s

    源码级别的

thread step-out
    直接执行完当前函数的所有代码,返回到上一个函数
    缩写:finish

————
指令(汇编指令)级别的下一步

thread step-inst-over 
    缩写:nexti、ni

thread step-inst
    缩写:stepi si
image list
    列举模块(加载动态库、可执行文件)

image lookup -t 
    t是类型

image lookup -t ViewController

image lookup -t NSInteger

image lookup -a 
    a是地址
    崩溃在源码的哪一行

image lookup -a 0x*******

image lookup -n 函数名或者符号
    函数的信息
1、敲回车执行上一个命令
2、expression self 
    简写:ex self 
3、
上一篇 下一篇

猜你喜欢

热点阅读