例如,我的程序中有一个函数NamespaceA :: ClassB :: FunctionC().我知道我可以通过"break NamespaceA :: ClassB :: FunctionC"让GDB打破它.但是,如果我只想让GDB在那里打破,我会怎么办?
我认为解决方案的解决方案是在程序中再添加一个变量,然后我可以使用GDB中的"break ... if cond"命令.但是我可以在不向程序中添加变量的情况下实现相同的功能吗?
谢谢.
seh*_*ehe 24
(gdb) continue 100
Run Code Online (Sandbox Code Playgroud)
应该做的伎俩
(gdb) help continue
Continue program being debugged, after signal or breakpoint.
If proceeding from breakpoint, a number N may be used as an argument,
which means to set the ignore count of that breakpoint to N – 1 (so that
the breakpoint won’t break until the Nth time it is reached).
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
8124 次 |
| 最近记录: |