condition breakpoint debugging 条件断点调试
Breakpoint Condition 断点条件
setting breakpoint condition 设定断点条件
The variables specified in the condition must be in scope at whatever line you set the breakpoint on, otherwise the expression wouldn't make sense!
条件中指定的变量必须在设置了断点的行中,否则表达式就没有什么意义!
We had to continue program execution twice to get to this point, however by setting a condition on the breakpoint we can make gdb halt only when "value" actually equals "div".
我们必须继续执行两次程序才会发生这种情况,但是只要在断点上设置一个条件就可以使 gdb 只在 "value" 与 "div" 真正相等时暂停。
If a breakpoint such as number 1 was already defined at line 21 we could use the 'condition' command instead to set the condition on the breakpoint.
如果已经在第21行中设置了断点,如1号断点,则可以使用' condition '命令来代替在断点上设置条件。
应用推荐