关于GDB运行时No symbol table is loaded. Use the “file“ command.的解决方法
最近有同学问GDB使用的问题,对此做一个整理。
首先,GDB已经报错file找不到了,那可以运行
file test
检测一下(gdb) file test
Reading symbols from test…(no debugging symbols found)…done.发现找不到可执行文件,所以问题应该在于编译时候没有加上
ggdb3
,重新编译一下ty@ubuntu:~$ gcc -ggdb3 -o main main.c
编译完成再次执行就没有问题了,问题解决。
还没有评论,来说两句吧...