Article View: gnu.gdb.bug
Article #2601Re: g++ & gdb core dumped !! Please help !!
From: Andrew Cagney
Date: Thu, 07 Mar 2002 18:37
Date: Thu, 07 Mar 2002 18:37
74 lines
3688 bytes
3688 bytes
Hello,
A more current GDB is going to work better with GCC 3.0.3
(http://sources.redhat.com/gdb/current/). Can I sugges trying that and
then, if things still fail, fileing a bug report
(http://sources.redhat.com/gdb/bugs/).
Andrew
> Hello Friends,
>
> I HAVE DOWNLOADED 'binutils' & 'gcc-3.0.3' BINARIES FOR SOLARIS 7 AND
> SUCCESSFULLY INSTALLED THEM. TO TEST THE COMPILER I HAVE WRITTEN A SMALL PROGRAM :
>
> ********----------------------------Begin--------------------------------------
>
> #include <iostream.h>
>
> int main (){
>
> cout << " This is test program" << endl;
> return 0;
>
> }
>
> ********------------------------------End--------------------------------------
>
> WHEN COMPILED IT IS 'OK' (compiled) BUT WHEN I RUN THE PROGRAM IT CORE DUMPED :
>
> ********---------------------------Begin---------------------------------------
>
> student4%>g++ -o testrun test.cpp
> student4%>./ testrun
> Segmentation Fault (core dumped)
>
> ********----------------------------End----------------------------------------
>
> THEN I HAVE DOWNLOADED 'gdb' AND INSTALLED SUCCESSFULLY. AND WHEN TRIED TO TRACE
> THE PROGRAM EVEN 'gdb' ALSO CORE DUMPED WHILE USING COMMANDS 'bt', 'where' :
>
> ********---------------------------Begin---------------------------------------
>
> student4%> g++ -o testrun -g t.cpp
> student4%> testrun
> Segmentation Fault (core dumped)
> student4%> gdb testrun core
> GNU gdb 4.18
> Copyright 1998 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 "sparc-sun-solaris2.7"...
> Core was generated by `testrun'.
> Program terminated with signal 11, Segmentation Fault.
> Reading symbols from /usr/local/lib/libstdc++.so.3...done.
> Reading symbols from /usr/lib/libm.so.1...done.
> Reading symbols from /usr/local/lib/libgcc_s.so.1...done.
> Reading symbols from /usr/lib/libc.so.1...done.
> Reading symbols from /usr/lib/libdl.so.1...done.
> #0 0x72ea20 in ?? ()
> (gdb) bt
> #0 0x72ea20 in ?? ()
> Segmentation Fault (core dumped)
>
> ********-----------------------------End---------------------------------------
>
> I COULD NOT UNDERSTAND WHAT IS THE PROBLEM AND HOW & WHERE TO START WITH TO
> SOLVE IT. PLEASE SUGGEST ME IN THIS REGARD.
>
> tHaNkS IN ADVANCE !!
>
> regards,
> Krishna
Technical Details
Message-ID:
<3C87B381.4010209@cygnus.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.uchicago.edu!newsfeed.cs.wisc.edu!nnxp1.twtelecom.net!news-out.visi.com!hermes.visi.com!uunet!ash.uu.net!spool0901.news.uu.net!wendy-fate.uu.net!bug-gdbReferences:
<000c01c1ad81$91421ca0$c71410ac@isg3>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f5053,d22c185ff405ccbb X-Google-Attributes: gidf5053,public X-Google-ArrivalTime: 2002-03-07 10:38:01 PST x-uunet-gateway: sjc3sosrv11.alter.net from bug-gdb to gnu.gdb.bug; Thu, 7 Mar 2002 18:38:00 GMT Message-ID: <3C87B381.4010209@cygnus.com> Date: Thu, 07 Mar 2002 13:37:53 -0500 From: ac131313@cygnus.com (Andrew Cagney) User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.8) Gecko/20020210 X-Accept-Language: en-us MIME-Version: 1.0 Subject: Re: g++ & gdb core dumped !! Please help !! References: <000c01c1ad81$91421ca0$c71410ac@isg3> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Approved: bug-gdb-request@mail.gnu.org Newsgroups: gnu.gdb.bug Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.uchicago.edu!newsfeed.cs.wisc.edu!nnxp1.twtelecom.net!news-out.visi.com!hermes.visi.com!uunet!ash.uu.net!spool0901.news.uu.net!wendy-fate.uu.net!bug-gdb Sender: bug-gdb-request@mail.gnu.org Lines: 76