From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1445 invoked by alias); 3 Oct 2007 06:17:35 -0000 Received: (qmail 1436 invoked by uid 22791); 3 Oct 2007 06:17:34 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 03 Oct 2007 06:17:32 +0000 Received: (qmail 18987 invoked from network); 3 Oct 2007 06:17:30 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 3 Oct 2007 06:17:30 -0000 To: "ying lcs" Cc: gdb@sourceware.org Subject: Re: Using gdb to debug Segmentation fault on linux References: <568e62a40710021646t2feea2f5re5a7c71d77bee72d@mail.gmail.com> From: Jim Blandy Date: Wed, 03 Oct 2007 06:17:00 -0000 In-Reply-To: <568e62a40710021646t2feea2f5re5a7c71d77bee72d@mail.gmail.com> (ying lcs's message of "Tue, 2 Oct 2007 18:46:22 -0500") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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/msg00033.txt.bz2 "ying lcs" writes: > 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: Knowing nothing about your code, I couldn't really suggest an approach. I don't even know whether fSenderReportBuffer is a field of this, or a global variable, or what. Could one of those identifiers possibly be a reference created by dereferencing a bad pointer? If you disassemble the machine code at that line, does that help? But please don't answer those questions. :) Your post was closer to being a request for help debugging your program than it was a question about GDB per se, so it's a bit off-topic. But if you have a question specifically about GDB, please feel free to ask.