有没有一个gdb命令来完成循环构造? [英] Is there a gdb command to finish a loop construct?

查看:245
本文介绍了有没有一个gdb命令来完成循环构造?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在gdb中,我有完成命令可以轻松完成功能框的执行,通常在浏览调试器中的代码之后,再看几遍循环,我想完成循环,继续行走。目前,我通过在循环之后的第一行设置一个断点,并且 continue ,但是如果有一个简单的gdb命令来使相同的效果,但不需要设置断点并稍后被清除。

In gdb, I have the finish command to easily finish execution of a function frame, often when walking through code in the debugger, after looking at a few iterations of a loop, I'd like to finish the loop and continue walking after it. Presently, I do this by setting a break point on the first line after the loop and continue, however, it would be really handy if there was a simple gdb command to have the same effect of this but not require a break point to be set and later cleared.

有没有在gdb中完成正在执行的当前循环的执行? >

Is there anyway in gdb to finish execution of the current loop being executed?

推荐答案


有没有一个gdb命令来完成循环构造?

Is there a gdb command to finish a loop construct?

在循环的最后一行执行直到,或直到NNN 其中 NNN 是循环的最后一行。

Execute until on the last line of the loop, or until NNN where NNN is the last line of the loop.

(gdb) help until
Execute until the program reaches a source line greater than the current
or a specified location (same args as break command) within the current frame.




不需要设置断点并稍后被清除。 p>

not require a break point to be set and later cleared.

临时断点自动清除:

(gdb) help tbreak
Set a temporary breakpoint.
Like "break" except the breakpoint is only temporary,
so it will be deleted when hit.  Equivalent to "break" followed
by using "enable delete" on the breakpoint number.

这篇关于有没有一个gdb命令来完成循环构造?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆