首页 > 数据库技术 > 详细

使用gdb调试程序时提示No symbol table is loaded. Use the "file" command.

时间:2018-06-30 21:13:02      阅读:503      评论:0      收藏:0      [点我收藏+]

这是因为编译.o文件时没有一起生成调试信息,应该在makefile中的编译命令中制定-g参数,如下:

  1 sort:main.o bubble.o

  2     gcc -o sort main.o bubble.o

  3 

  4 main.o:main.c bubble.h

  5     gcc -g -c main.c

  6 

  7 pubble.o:bubble.c

  8     gcc -g -c bubble.c

  9 

 10 clean:

 11     rm sort main.o bubble.o

使用gdb调试程序时提示No symbol table is loaded. Use the "file" command.

原文:https://www.cnblogs.com/skxabc/p/9248617.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!