From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15070 invoked by alias); 15 Dec 2003 14:16:11 -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 15062 invoked from network); 15 Dec 2003 14:16:10 -0000 Received: from unknown (HELO monty-python.gnu.org) (199.232.76.173) by sources.redhat.com with SMTP; 15 Dec 2003 14:16:10 -0000 Received: from [207.232.27.5] (helo=WST0054) by monty-python.gnu.org with asmtp (Exim 4.24) id 1AVuRN-00032a-Ck; Mon, 15 Dec 2003 10:15:21 -0500 Date: Mon, 15 Dec 2003 14:16:00 -0000 Message-Id: From: Eli Zaretskii To: "Vianney Lecroart" CC: gdb@sources.redhat.com In-reply-to: <000b01c3c2f9$35a1fe80$0901a8c0@vianneyl> (lecroart@nevrax.com) Subject: Re: displaying source after and before the program counter Reply-to: Eli Zaretskii References: <000b01c3c2f9$35a1fe80$0901a8c0@vianneyl> X-SW-Source: 2003-12/txt/msg00209.txt.bz2 > 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? Without turning off the inlining, yes? Well, one way to do that is to look at the machine code in frame #3 (by using the `disassemble' command), then compare that with the assembly generated by the compiler for the source code in question. For the latter, invoke GCC exactly as it is invoked to compile the cpp file which includes mpvi.h, but with the -S switch instead of the -c switch. (There are also switches that you can add to cause the generated assembly to include source lines, which will make it easier for you to associate the assembly with the source.) HTH