该process continue
命令接受一个-i
选项,该选项将忽略您当前在当前线程上停止的断点的下一个i匹配项。例如
Process 13559 stopped
* thread #1: tid = 0xb7da5, 0x0000000100000f21 a.out`main + 49 at a.c:7, stop reason = breakpoint 2.1
#0: 0x0000000100000f21 a.out`main + 49 at a.c:7
4 int i;
5 for (i = 0; i < 100; i++)
6 {
-> 7 printf ("%d\n", i);
8 }
9 }
(lldb) c -i 5
Process 13559 resuming
0
1
2
3
4
5
Process 13559 stopped
* thread #1: tid = 0xb7da5, 0x0000000100000f21 a.out`main + 49 at a.c:7, stop reason = breakpoint 2.1
#0: 0x0000000100000f21 a.out`main + 49 at a.c:7
4 int i;
5 for (i = 0; i < 100; i++)
6 {
-> 7 printf ("%d\n", i);
8 }
9 }
(lldb)
您还可以直接使用设置断点的忽略计数breakpoint modify -i count bpnum
。