問題描述
我有一個 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模板網!