From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5161 invoked by alias); 2 Oct 2007 23:46:27 -0000 Received: (qmail 5153 invoked by uid 22791); 2 Oct 2007 23:46:27 -0000 X-Spam-Check-By: sourceware.org Received: from an-out-0708.google.com (HELO an-out-0708.google.com) (209.85.132.244) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 02 Oct 2007 23:46:25 +0000 Received: by an-out-0708.google.com with SMTP id c23so634743anc for ; Tue, 02 Oct 2007 16:46:23 -0700 (PDT) Received: by 10.142.156.2 with SMTP id d2mr91116wfe.1191368782221; Tue, 02 Oct 2007 16:46:22 -0700 (PDT) Received: by 10.141.84.13 with HTTP; Tue, 2 Oct 2007 16:46:22 -0700 (PDT) Message-ID: <568e62a40710021646t2feea2f5re5a7c71d77bee72d@mail.gmail.com> Date: Tue, 02 Oct 2007 23:46:00 -0000 From: "ying lcs" To: gdb@sourceware.org Subject: Using gdb to debug Segmentation fault on linux MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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/msg00032.txt.bz2 Hi, I am trying to use gdb to debug a segmentation fault on linux: I get this backtrace dump, but I don't see what's wrong and why i get a segmentation fault. The address of 'this' looks correct. So I would need some help in how to proceed in troubleshooting this problem: 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); (gdb) (gdb) bt #0 0x08067623 in RTPStream::SendRTCPSR (this=0x83a1520, inTime=@0x1b9a5b58, inAppendBye=0) at RTCPUtilitiesLib/RTCPSRPacket.h:123 #1 0x08067d40 in RTPStream::Write (this=0x83a1520, inBuffer=0x839d688, inLen=45, outLenWritten=0x0, inFlags=Variable "inFlags" is not available. ) at Server.tproj/RTPStream.cpp:1093 #2 0x0804c47f in QTSSCallbacks::QTSS_Write (inStream=0x83a1520, inBuffer=0x839d688, inLen=45, outLenWritten=0x0, inFlags=5) at Server.tproj/QTSSCallbacks.cpp:343 #3 0x080a28b6 in QTSSFileModuleDispatch (inRole=1936027236, inParamBlock=0xb75e6360) at APIModules/QTSSFileModule/QTSSFileModule.cpp:1569 #4 0x080608ed in RTPSession::Run (this=0x83945b0) at Server.tproj/QTSSModule.h:92 #5 0x080eb1c3 in TaskThread::Entry (this=0x8361258) at Task.cpp:179 #6 0x080e82af in OSThread::_Entry (inThread=0x8361258) at OSThread.cpp:254 #7 0x00106341 in start_thread () from /lib/tls/libpthread.so.0 #8 0x00c966fe in clone () from /lib/tls/libc.so.6