您要“直到”命令 – 请参阅
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.