From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29966 invoked by alias); 5 Jul 2011 07:13:35 -0000 Received: (qmail 29956 invoked by uid 22791); 5 Jul 2011 07:13:34 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 05 Jul 2011 07:13:15 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p657DFY5022242 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 5 Jul 2011 03:13:15 -0400 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p657DE5c003591; Tue, 5 Jul 2011 03:13:14 -0400 From: Phil Muldoon To: Mahmood Naderan Cc: "gdb\@sourceware.org" Subject: Re: GDB doesnot catches segmentation fault References: <1309847935.50900.YahooMailNeo@web111702.mail.gq1.yahoo.com> Reply-to: pmuldoon@redhat.com X-URL: http://www.redhat.com Date: Tue, 05 Jul 2011 07:13:00 -0000 In-Reply-To: <1309847935.50900.YahooMailNeo@web111702.mail.gq1.yahoo.com> (Mahmood Naderan's message of "Mon, 4 Jul 2011 23:38:55 -0700 (PDT)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-07/txt/msg00013.txt.bz2 Mahmood Naderan writes: > Hi > I have attached a PID to gdb. Although the code crashed with segmentation= fault, but gdb ignores that and I am not able to view backtrace. > 0x0000000000447bfb in Event::initialized (this=3D0x41ec648) at build/ALPH= A_FS/sim/eventq.hh:84 > 84=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 initialized() co= nst > (gdb) c > Continuing. > Segmentation fault > mahmood@mpc:~$ This looks like GDB crashed with a segmentation fault. There is not enough information to work with here. There are two things you could try: A newer GDB, the problem might already have been fixed. Or, submit a backtrace for GDB. If you have debug information installed for GDB you can do this. I am not sure of the method for installing debug information for installed packages with Ubuntu. But assuming you do have them: Type:=20 ulimit -c unlimited in the terminal where you will launch GDB (This will allow core-files to be generated). Attach GDB to the program (as you did above) and replicate the scenario to crash GDB. Then: gdb gdb --core=3Dyourcore.pid Where "youcore.pid" is the core-file that GDB generated on crash. Then type "bt" into GDB. This will produce a backtrace of the crashing GDB process. Then create a bug at:=20 http://sourceware.org/bugzilla/=20 for gdb, and paste the "bt" output. Also include any supplemental information you think is useful. Cheers, Phil