在gdb中,我可以通过"continue n"跳过下n个断点,或者通过"next n"跳过下n行.lldb中的等价物是什么?
如果没有,我怎么能在lldb python扩展中自己创建它们?我试过这样的东西,但它没有用,当我输入我添加的命令时lldb挂起.
def cc(debugger, args, result, dict):
target = debugger.GetSelectedTarget()
process = target.GetProcess()
process.Continue()
Run Code Online (Sandbox Code Playgroud)
该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)
Run Code Online (Sandbox Code Playgroud)
您也可以直接使用设置断点的忽略计数breakpoint modify -i count bpnum。
| 归档时间: |
|
| 查看次数: |
2195 次 |
| 最近记录: |