Is there a gdb command to finish a loop construct?

末鹿安然 提交于 2019-12-02 18:06:34

Is there a gdb command to finish a loop construct?

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.

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

Temporary breakpoints automatically clear themselves:

(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 doesn't know where a loop ends so it can't do that. I think the best you can do is use the advance command with a location after the loop.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!