【Linux】gdb调试 g++ -g ... gdb l 列出代码,回车键继续 break main / 行号 加断点 n 单步运行 s 单步运行(可进入函数) p 输出变量 p *array@len 输出数组