linux gdb 没有符号表被读取。请使用 "file" 命令。

使用gdb时遇到这个问题,刚开始接触linux下使用gdb调试程序,其原因是生成的二进制可执行文件没有使用-g选项。

gcc中-g选项是为了获得有关调试信息,要用gdb进行调试,必须使用-g生成二进制可执行文件,

gcc -g example.c -o example

Sometimes it s the very people who no one imagines anything of. who do the things that no one can imagine.
原文地址:https://www.cnblogs.com/YCuangWhen/p/5188084.html