加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c – 如何跳过ddd(gdb)中的循环

发布时间:2020-12-16 05:39:18 所属栏目:百科 来源:网络整理
导读:在使用DDD的许多有时是淹没的调试会话中,我绊倒了循环.而且我继续按下来,如果有很多次迭代,我只是设置一个断点,然后按“继续”.有没有其他的方式去过循环? 解决方法 您要“直到”命令 – 请参阅 http://www.gnu.org/software/gdb/documentation的gdb手册:
在使用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.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读