- 论坛徽章:
- 0
|
本帖最后由 tusy0123456 于 2010-03-08 23:45 编辑
小弟使用gdb查找段错误遇到点问题,希望各位达人帮忙解决一下!
内容如下:
gcc版本为:
[alex@W transmission_3Y]$ gcc -v
使用内建 specs。
目标:i586-redhat-linux
配置为:../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch=i586 --build=i586-redhat-linux
线程模型:posix
gcc 版本 4.4.0 20090506 (Red Hat 4.4.0-4) (GCC)
所写程序makefile中为:
gcc -g -o out $(objects) //$(objects)为out的依赖条件
然后:
[alex@W transmission_3Y]$ make
[alex@W transmission_3Y]$ ./out
段错误
[alex@W transmission_3Y]$ gdb ./out
GNU gdb (GDB) Fedora (6.8.50.20090302-21.fc11)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"and "show warranty" for details.
This GDB was configured as "i586-redhat-linux-gnu".
For bug reporting instructions, please see:<http://www.gnu.org/software/gdb/bugs/>...
(gdb) r
Starting program: /home/alex/Spread/transmission_3Y/out
Program received signal SIGSEGV, Segmentation fault.
0x080486fb in main ()
Missing separate debuginfos, use: debuginfo-install glibc-2.10.1-2.i686
调试环境为Fedora-11-i386-DVD安装的虚拟机
哪位大虾能告诉我最后一句是这么回事?为什么会这样?怎样能解决? |
|