🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #2767

g++ & gdb core dumped !! Please help !!

#2767
From: Krishna Murthy Gudipati
Date: Mon, 04 Feb 2002 13:40
191 lines
7792 bytes
This is a multi-part message in MIME format.

------=_NextPart_000_0009_01C1ADAF.AA8576C0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

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

------=_NextPart_000_0009_01C1ADAF.AA8576C0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hello Friends,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I HAVE DOWNLOADED 'binutils' &amp; =
'gcc-3.0.3'=20
BINARIES FOR SOLARIS 7 AND<BR>SUCCESSFULLY INSTALLED THEM. TO TEST THE =
COMPILER=20
I HAVE WRITTEN A SMALL PROGRAM :</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>********----------------------------Begin-----------------------=
---------------</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>#include =
&lt;iostream.h&gt;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>int main (){</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>cout &lt;&lt; " This is test program" =
&lt;&lt;=20
endl;<BR>return 0;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>}</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>********------------------------------End-----------------------=
---------------</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>WHEN COMPILED IT IS 'OK' (compiled) BUT =
WHEN I RUN=20
THE PROGRAM IT CORE DUMPED :</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>********---------------------------Begin------------------------=
---------------</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>student4%&gt;g++ -o testrun=20
test.cpp<BR>student4%&gt;./ testrun<BR>Segmentation Fault (core=20
dumped)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>********----------------------------End-------------------------=
---------------</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>THEN I HAVE DOWNLOADED 'gdb' AND =
INSTALLED=20
SUCCESSFULLY. AND WHEN TRIED TO TRACE<BR>THE PROGRAM EVEN 'gdb' ALSO =
CORE DUMPED=20
WHILE USING COMMANDS 'bt', 'where' :</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>********---------------------------Begin------------------------=
---------------</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>student4%&gt; g++ -o testrun -g=20
t.cpp<BR>student4%&gt; testrun<BR>Segmentation Fault (core=20
dumped)<BR>student4%&gt; gdb testrun core<BR>GNU gdb 4.18<BR>Copyright =
1998 Free=20
Software Foundation, Inc.<BR>GDB is free software, covered by the GNU =
General=20
Public License, and you are<BR>welcome to change it and/or distribute =
copies of=20
it under certain conditions.<BR>Type "show copying" to see the=20
conditions.<BR>There is absolutely no warranty for GDB.&nbsp; Type "show =

warranty" for details.<BR>This GDB was configured as=20
"sparc-sun-solaris2.7"...<BR>Core was generated by `testrun'.<BR>Program =

terminated with signal 11, Segmentation Fault.<BR>Reading symbols from=20
/usr/local/lib/libstdc++.so.3...done.<BR>Reading symbols from=20
/usr/lib/libm.so.1...done.<BR>Reading symbols from=20
/usr/local/lib/libgcc_s.so.1...done.<BR>Reading symbols from=20
/usr/lib/libc.so.1...done.<BR>Reading symbols from=20
/usr/lib/libdl.so.1...done.<BR>#0&nbsp; 0x72ea20 in ?? ()<BR>(gdb)=20
bt<BR>#0&nbsp; 0x72ea20 in ?? ()<BR>Segmentation Fault (core=20
dumped)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>********-----------------------------End------------------------=
---------------</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I COULD NOT UNDERSTAND WHAT IS THE =
PROBLEM AND HOW=20
&amp; WHERE TO START WITH TO<BR>SOLVE IT. PLEASE SUGGEST ME IN THIS=20
REGARD.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>tHaNkS IN ADVANCE !!</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial =
size=3D2>regards,<BR>Krishna</FONT></DIV></BODY></HTML>

------=_NextPart_000_0009_01C1ADAF.AA8576C0--
Technical Details
Message-ID: <000c01c1ad81$91421ca0$c71410ac@isg3>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!news.gtei.net!news-out.visi.com!hermes.visi.com!uunet!ash.uu.net!spool0901.news.uu.net!wendy-fate.uu.net!bug-gdb

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5053,d22c185ff405ccbb,start
X-Google-Attributes: gidf5053,public
X-Google-ArrivalTime: 2002-02-04 05:43:58 PST
x-uunet-gateway: mr1.ash.ops.us.uu.net from bug-gdb to gnu.gdb.bug; Mon, 4 Feb 2002 13:39:30 GMT
Message-ID: <000c01c1ad81$91421ca0$c71410ac@isg3>
Reply-To: "Krishna Murthy Gudipati" <murthy@isg.cmcltd.com>
From: "Krishna Murthy Gudipati" <murthy@isg.cmcltd.com>
Subject: g++ & gdb core dumped !! Please help !!
Date: Mon, 4 Feb 2002 19:10:53 +0530
MIME-Version: 1.0
Content-Type: multipart/alternative;
 boundary="----=_NextPart_000_0009_01C1ADAF.AA8576C0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
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!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!news.gtei.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: 192