如果我需要执行std::function调用,则使用调试器单步执行功能对象可能会造成困惑。

是否有可能跳过这些帧?

最佳答案

gdb 7.4为此添加了skip系列命令。

(gdb) apropos skip
info skip -- Display the status of skips
set step-mode -- Set mode of the step operation
show step-mode -- Show mode of the step operation
skip -- Ignore a function while stepping
skip delete -- Delete skip entries
skip disable -- Disable skip entries
skip enable -- Enable skip entries
skip file -- Ignore a file while stepping
skip function -- Ignore a function while stepping

关于c++ - 单步执行std::function调用时,如何跳过std namespace 中的方法调用? (使用GDB。),我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/10955884/

10-11 22:31