用gdb退出当前函数 [英] Step out of current function with gdb
本文介绍了用gdb退出当前函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
那些使用Visual Studio的人会熟悉 Shift + F11 热键,它从一个函数中退出,这意味着它继续执行当前函数,直到它返回到它的调用者,在这一点上,它停止。
在gdb中是否有等价物?
解决方案
您可以使用完成
命令。
finish
:继续运行,直到选定堆栈框架中的函数返回。打印返回的值(如果有的话)。这个命令可以缩写为fin
。
Those who use Visual Studio will be familiar with the Shift+F11 hotkey, which steps out of a function, meaning it continues execution of the current function until it returns to its caller, at which point it stops.
Is there an equivalent in gdb?
解决方案
You can use the finish
command.
finish
: Continue running until just after function in the selected stack frame returns. Print the returned value (if any). This command can be abbreviated asfin
.
这篇关于用gdb退出当前函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文