如何使用gdb“s”命令摆脱步入stl_vector.h?

时间:2013-09-11 15:20:52

标签: c++ gdb stdvector

主题。

编译:g ++ -g -Wall -o program program.cpp

正在运行:gdb -tui program

谢谢,

哈维尔。

2 个答案:

答案 0 :(得分:5)

如果你有GDB 7.4或更高版本,那么有一个skip命令,可以跳过功能或整个文件。将文件或函数标记为跳过后,它不会再次进入它。来自GDB手册 - Skipping Over Functions and Files

skip [linespec]

skip function [linespec]
After running this command, the function named by linespec or the function containing the line named by linespec will be skipped over when stepping. 

skip file [filename]
After running this command, any function whose source lives in filename will be skipped over when stepping.

答案 1 :(得分:2)

使用fin(ish)命令退出函数调用。或者使用n(ext)命令跳过函数调用。请参阅Continuing and Stepping