From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27766 invoked by alias); 15 Dec 2003 15:53:18 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 27759 invoked from network); 15 Dec 2003 15:53:18 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 15 Dec 2003 15:53:18 -0000 Received: from drow by nevyn.them.org with local (Exim 4.24 #1 (Debian)) id 1AVv25-0003hW-Nl for ; Mon, 15 Dec 2003 10:53:17 -0500 Date: Mon, 15 Dec 2003 15:53:00 -0000 From: Daniel Jacobowitz To: gdb@sources.redhat.com Subject: Re: displaying source after and before the program counter Message-ID: <20031215155317.GB13947@nevyn.them.org> Mail-Followup-To: gdb@sources.redhat.com References: <1071484872.21849.ezmlm@sources.redhat.com> <000b01c3c2f9$35a1fe80$0901a8c0@vianneyl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000b01c3c2f9$35a1fe80$0901a8c0@vianneyl> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-12/txt/msg00212.txt.bz2 On Mon, Dec 15, 2003 at 11:50:09AM +0100, Vianney Lecroart wrote: > Hello, > > I have a C++ program that generates a core dump. I must activate > inlining because it's too slow. It crashes very rarely. > > The program stack is: > > #2 0x080597da in CBase::operator()() const () at > /home/ace/src/gs/mpvi.h:451 > #3 0x081e0c1f in CPhrase::update() (this=0x115245d8) at > /home/ace/src/gs/mpvi.h:527 > > The problem is that CPhrase::update() is a big function in a cpp file. I > would like to know the line where the call to mpvi.h:527 is made. I > can't see it because the function is inlining and it's an accessor, so, > it's called at least 50 times on this function. > > The question is: Is it possible to know where in the function ::update() > the crash happened? In addition to the other suggestions you've gotten, you can work this out by hand from the debug information; however, it's a bit of a pain to do and you have to get familiar with DWARF-2. GDB has enough information to do this for you but currently doesn't support it. Hopefully that will change sometime next year. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer