From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8956 invoked by alias); 30 Jan 2007 12:48:22 -0000 Received: (qmail 8948 invoked by uid 22791); 30 Jan 2007 12:48:21 -0000 X-Spam-Check-By: sourceware.org Received: from outmx009.isp.belgacom.be (HELO outmx009.isp.belgacom.be) (195.238.5.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 30 Jan 2007 12:48:12 +0000 Received: from outmx009.isp.belgacom.be (localhost [127.0.0.1]) by outmx009.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22) with ESMTP id l0UCm7d6003231 for ; Tue, 30 Jan 2007 13:48:07 +0100 (envelope-from ) Received: from [192.168.1.2] (12.192-200-80.adsl-dyn.isp.belgacom.be [80.200.192.12]) by outmx009.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22) with ESMTP id l0UClx2t003147; Tue, 30 Jan 2007 13:47:59 +0100 (envelope-from ) Date: Tue, 30 Jan 2007 12:48:00 -0000 From: Vincent De Groote To: Daniel Jacobowitz , gdb@sourceware.org Subject: Re: Nexted function context Message-ID: In-Reply-To: <20070130121300.GA17458@nevyn.them.org> References: <20070130121300.GA17458@nevyn.them.org> X-Mailer: Mulberry/4.0.7 (Win32) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed 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-01/txt/msg00351.txt.bz2 I just made a simple example: #include int main ( int argc, char ** argv ) { int add_something ( int value ) { int result; if ( value < 10 ) result = value + 10; else result = value - 10; return ( result ); } int i; for ( i = 0; i < 100; i++ ) printf ("%d\n", add_something ( i )); return (0); } when single stepping into add_something function, doing "p value" or "p result" reports the same message "No symbol "xxxxx" in current context". I also looked for a way of setting a breakpoint into a nested function, but never succeeds. Thanks Vincent De Groote --On 30 January 2007 07:13 -0500 Daniel Jacobowitz wrote: > On Tue, Jan 30, 2007 at 08:53:13AM +0000, Vincent De Groote wrote: >> Hello, >> >> I'm using gdb on c files compiled with gcc. I use a lot of nested >> function calls. >> When the program makes a core dump in a nested function, I can't see the >> local variables (No symbol in local context). >> >> I have the same problem if I single step within a running program. > > Can you provide a small test case for this problem? > > -- > Daniel Jacobowitz > CodeSourcery