From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24382 invoked by alias); 15 Dec 2003 15:47:27 -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 24375 invoked from network); 15 Dec 2003 15:47:26 -0000 Received: from unknown (HELO sadr.equallogic.com) (66.155.203.134) by sources.redhat.com with SMTP; 15 Dec 2003 15:47:26 -0000 Received: from sadr.equallogic.com (localhost.localdomain [127.0.0.1]) by sadr.equallogic.com (8.12.8/8.12.8) with ESMTP id hBFFlQf9017904 for ; Mon, 15 Dec 2003 10:47:26 -0500 Received: from deneb.dev.equallogic.com (deneb [172.16.1.99]) by sadr.equallogic.com (8.12.8/8.12.8) with ESMTP id hBFFlPiu017896; Mon, 15 Dec 2003 10:47:25 -0500 Received: from localhost.equallogic.com (localhost.localdomain [127.0.0.1]) by deneb.dev.equallogic.com (8.11.6/8.11.6) with ESMTP id hBFFlPx03487; Mon, 15 Dec 2003 10:47:25 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16349.55181.215376.985034@gargle.gargle.HOWL> Date: Mon, 15 Dec 2003 15:47:00 -0000 From: Paul Koning To: lecroart@nevrax.com CC: gdb@sources.redhat.com Subject: Re: displaying source after and before the program counter References: <000b01c3c2f9$35a1fe80$0901a8c0@vianneyl> X-SW-Source: 2003-12/txt/msg00210.txt.bz2 >>>>> "Eli" == Eli Zaretskii writes: >> From: "Vianney Lecroart" Date: Mon, 15 Dec >> 2003 11:50:09 +0100 >> >> 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? Eli> Without turning off the inlining, yes? Eli> Well, one way to do that is to look at the machine code in frame Eli> #3 (by using the `disassemble' command), then compare that with Eli> the assembly generated by the compiler for the source code in Eli> question. Here's another approach: Invoke the program via gdb. Set a breakpoint at the address shown in the call stack. Start the program. When the breakpoint hits, step to the next line ("n") until you're back in the cpp file. You're now near the inline function call you need, most likely at the next line. (Perhaps not quite, depending on how much the optimizer has moved things around. paul