在函数返回的GDB中设置断点 [英] Setting breakpoint in GDB where the function returns

查看:114
本文介绍了在函数返回的GDB中设置断点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个C ++函数,在各个地方有很多返回语句。如何在函数实际返回的return语句中设置断点?

I have a C++ function which has many return statements at various places. How to set a breakpoint at the return statement where the function actually returns ?

没有参数的break命令是什么意思?

And what does "break" command without argument means?

推荐答案

无参数断点停止在当前选择的堆栈帧中的下一条指令执行。您可以通过框架向上向下选择strack框架命令。如果您要调试您实际上 离开当前功能的点,请选择下一个外框,然后在那里断开。

break without arguments stops execution at the next instruction in the currently selected stack frame. You select strack frames via the frame or up and down commands. If you want to debug the point where you are actually leaving the current function, select the next outer frame and break there.

这篇关于在函数返回的GDB中设置断点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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