关于GDB运行时No symbol table is loaded. Use the “file“ command.的解决方法

  最近有同学问GDB使用的问题,对此做一个整理。

  1. 首先,GDB已经报错file找不到了,那可以运行file test检测一下
(gdb) file test
Reading symbols from test...(no debugging symbols found)...done.
  1. 发现找不到可执行文件,所以问题应该在于编译时候没有加上ggdb3,重新编译一下
ty@ubuntu:~$ gcc -ggdb3 -o main main.c
  1. 编译完成再次执行就没有问题了,问题解决。

猜你喜欢

转载自blog.csdn.net/u013354486/article/details/111411418