免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1760 | 回复: 4
打印 上一主题 下一主题

gdb 问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-03-22 11:09 |只看该作者 |倒序浏览
编写的一个很简单的程序 通过 gcc -g -o sum sum.c编译后
在用gdb sum 调试 然后run运行时就会有下面的提醒:
[heng@localhost ~]$ gdb sum
GNU gdb Red Hat Linux (6.6-35.fc8rh)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run
Starting program: /home/heng/sum

warning: Missing the separate debug info file: /usr/lib/debug/.build-id/ac/2eeb206486bb7315d6ac4cd64de0cb50838ff6.debug

warning: Missing the separate debug info file: /usr/lib/debug/.build-id/ba/4ea1118691c826426e9410cafb798f25cefad5.debug
the sum of 1+2+...+99==4950
Program exited with code 033.
(gdb)
哪位大虾知道这是怎么回事阿 ?我是菜鸟,希望能给出具体的解决方法。谢谢

论坛徽章:
0
2 [报告]
发表于 2008-03-22 11:58 |只看该作者
贴代码看。  




论坛徽章:
0
3 [报告]
发表于 2008-03-23 14:56 |只看该作者
#include<stdio.h>
#include<stdlib.h>
main()
{
  int i,sum;
  sum=0;
for(i=1;i<100;i++)
  {
   sum+=i;
}
printf("the sum of 1+2+...+99==%d",sum);
}

论坛徽章:
95
程序设计版块每日发帖之星
日期:2015-09-05 06:20:00程序设计版块每日发帖之星
日期:2015-09-17 06:20:00程序设计版块每日发帖之星
日期:2015-09-18 06:20:002015亚冠之阿尔艾因
日期:2015-09-18 10:35:08月度论坛发贴之星
日期:2015-09-30 22:25:002015亚冠之阿尔沙巴布
日期:2015-10-03 08:57:39程序设计版块每日发帖之星
日期:2015-10-05 06:20:00每日论坛发贴之星
日期:2015-10-05 06:20:002015年亚冠纪念徽章
日期:2015-10-06 10:06:482015亚冠之塔什干棉农
日期:2015-10-19 19:43:35程序设计版块每日发帖之星
日期:2015-10-21 06:20:00每日论坛发贴之星
日期:2015-09-14 06:20:00
4 [报告]
发表于 2008-03-23 21:16 |只看该作者
怎么会出现这种错误?你是不是安装了什么调试版本的库?或者你自己编译了一些库?

论坛徽章:
0
5 [报告]
发表于 2008-03-26 17:21 |只看该作者

回复 #4 MMMIX 的帖子

我也不知道怎么会这样,还在网上看到一位网友和我的问题一模一样,好像也没解决呢。我不知道怎样自己编译库,应该没有吧,好像也没安装什么阿。
真是麻烦各位了!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP