主题。
编译:g ++ -g -Wall -o program program.cpp
正在运行:gdb -tui program
谢谢,
哈维尔。
答案 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。