在使用DDD的许多有时是淹没的调试会话中,我绊倒了循环.而且我继续按下来,如果有很多次迭代,我只是设置一个断点,然后按“继续”.有没有其他的方式去过循环?
解决方法
您要“直到”命令 – 请参阅
http://www.gnu.org/software/gdb/documentation的gdb手册:
Continue running until a source line
past the current line,in the current
stack frame,is reached. This command
is used to avoid single stepping
through a loop more than once. It is
like the next command,except that
when until encounters a jump,it
automatically continues execution
until the program counter is greater
than the address of the jump.This means that when you reach the end of a loop after single stepping though it,until makes your program continue execution until it exits the loop. In contrast,a next command at the end of a loop simply steps back to the beginning of the loop,which forces you to step through the next iteration.