单步执行std :: function调用时,如何跳过std名称空间中的方法调用?(使用GDB。)

Sta*_*ked 5 c++ gdb c++11

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

是否可以跳过这些帧?

mat*_*att 3

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
Run Code Online (Sandbox Code Playgroud)

  • 这根本跳过了对 std::function 的调用,而不是直接进入我的代码。 (2认同)