码迷,mamicode.com
首页 > 数据库 > 详细

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

时间:2018-06-30 21:24:00      阅读:440      评论:0      收藏:0      [点我收藏+]

标签:makefile   程序   command   load   调试   ade   symbol   bsp   gdb   

这是因为编译.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.

标签:makefile   程序   command   load   调试   ade   symbol   bsp   gdb   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!