我有一个 C++ 函数,它在不同的地方有很多 return 语句.如何在函数实际返回的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?
break without arguments 在当前选定堆栈帧中的下一条指令处停止执行.您可以通过 frame 或 up 和 down 命令选择跟踪帧.如果要调试实际上离开当前函数的点,请选择下一个外部框架并在那里中断.
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 中设置断点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
为什么两个函数的地址相同?Why do two functions have the same address?(为什么两个函数的地址相同?)
为什么 std::function 的初始化程序必须是可复制构Why the initializer of std::function has to be CopyConstructible?(为什么 std::function 的初始化程序必须是可复制构造的?)
混合模板与多态性mixing templates with polymorphism(混合模板与多态性)
我什么时候应该使用关键字“typename"?使用模When should I use the keyword quot;typenamequot; when using templates(我什么时候应该使用关键字“typename?使用模板时)
依赖名称解析命名空间 std/标准库Dependent name resolution amp; namespace std / Standard Library(依赖名称解析命名空间 std/标准库)
gcc 可以编译可变参数模板,而 clang 不能gcc can compile a variadic template while clang cannot(gcc 可以编译可变参数模板,而 clang 不能)