调试程序
1 2 3 |
ldb /Projects/Sketch/build/Debug/Sketch.app file /Projects/Sketch/build/Debug/Sketch.app |
附加进程
1 2 3 |
process attach --pid 123 process attach --name Sketch process attach --name Sketch --waitfor |
线程
1 2 3 4 5 |
thread list # 线程堆栈 thread backtrace thread backtrace all |
读内存
1 2 3 |
memory read var me read var |
打断点
1 2 3 4 5 6 7 8 9 10 11 12 13 |
# shell breakpoint set --file foo.c --line 12 breakpoint set -f foo.c -l 12 breakpoint set --name foo breakpoint set -n foo breakpoint set --name foo --name bar breakpoint set --method foo breakpoint set -M foo breakpoint list |
1 2 3 |
# obj-c breakpoint set --selector alignLeftEdges: breakpoint set -S alignLeftEdges: |
调试
1 2 3 4 5 6 7 8 |
# 下一行[next] n # 进入函数 s # 跳出[finish] fin # 恢复运行[continue] c |
变量
1 2 |
frame variable frame variable a |
寄存器
1 2 3 4 |
# 全部寄存器 re re # 读 re read $rsi |
本文为原创文章,版权归Aet所有,欢迎分享本文,转载请保留出处!
你可能也喜欢
- ♥ Dump分析:重复释放堆内存,死锁03/17
- ♥ Visual Studio:子进程调试相关07/15
- ♥ 各平台调试方法总结记述一09/25
- ♥ Vim编辑器的操作03/17
- ♥ Linux 进程创建&&控制&&终止03/28
- ♥ Linux_ 命令大全 系统管理03/16