日期:2014-05-16  浏览次数:20643 次

为什么我在linux中输入gdb调试可执行文件没有用呢?(图)

在命令行中输入gdb test后提示:
No symbol table is loaded . Use the "file" command.
GDB 调试 Linux

------解决方案--------------------
编译时有加-g选项么?
------解决方案--------------------
少了参数当然不行。应该这样:
#gcc -g hello.c -o hello
#gdb hello