From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13672 invoked by alias); 3 Oct 2007 09:41:41 -0000 Received: (qmail 13663 invoked by uid 22791); 3 Oct 2007 09:41:40 -0000 X-Spam-Check-By: sourceware.org Received: from kz-easy.com (HELO almaty.kz-easy.com) (85.214.25.173) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 03 Oct 2007 09:41:34 +0000 Received: from alatau.radix50.net (dslb-088-065-240-017.pools.arcor-ip.net [88.65.240.17]) (authenticated bits=0) by almaty.kz-easy.com (8.13.8/8.13.8/Debian-3) with ESMTP id l939fNF6012446 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Wed, 3 Oct 2007 11:41:25 +0200 Received: from alatau.radix50.net (localhost [127.0.0.1]) by alatau.radix50.net (8.13.8/8.13.8/Debian-3) with ESMTP id l939fITN005579 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Wed, 3 Oct 2007 11:41:18 +0200 Received: (from ibr@localhost) by alatau.radix50.net (8.13.8/8.13.8/Submit) id l939fHo2005578 for gdb@sourceware.org; Wed, 3 Oct 2007 11:41:17 +0200 Date: Wed, 03 Oct 2007 09:41:00 -0000 From: Baurzhan Ismagulov To: gdb@sourceware.org Subject: Re: Using gdb to debug Segmentation fault on linux Message-ID: <20071003094117.GA4885@radix50.net> Mail-Followup-To: gdb@sourceware.org References: <568e62a40710021646t2feea2f5re5a7c71d77bee72d@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <568e62a40710021646t2feea2f5re5a7c71d77bee72d@mail.gmail.com> User-Agent: Mutt/1.5.13 (2006-08-11) 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: 2007-10/txt/msg00034.txt.bz2 Hello Ying, On Tue, Oct 02, 2007 at 06:46:22PM -0500, ying lcs wrote: > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread -1218548816 (LWP 25361)] > 0x08067623 in RTPStream::SendRTCPSR (this=0x83a1520, inTime=@0x1b9a5b58, > inAppendBye=0) at RTCPUtilitiesLib/RTCPSRPacket.h:123 > 123 ((UInt32*)&fSenderReportBuffer)[(fSenderReportWithServerInfoSize > >> 2) + 1] = htonl(inSSRC); First, you need to understand what SIGSEGV is. See, e.g., http://en.wikipedia.org/wiki/SIGSEGV . Second, you need to understand what exactly caused it. "p &((UInt32*)&fSenderReportBuffer)[(fSenderReportWithServerInfoSize >> 2) + 1]" at the gdb prompt might give a hint (compare it with the value of fSenderReportBuffer and sizeof fSenderReportBuffer). Only when these two are clear it would make sense to look at the bt, which may or may not help. With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.com/