From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20956 invoked by alias); 22 Feb 2005 20:15:19 -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 20895 invoked from network); 22 Feb 2005 20:15:13 -0000 Received: from unknown (HELO tully.CS.Berkeley.EDU) (128.32.153.227) by sourceware.org with SMTP; 22 Feb 2005 20:15:13 -0000 Received: from tully.CS.Berkeley.EDU (localhost [127.0.0.1]) by tully.CS.Berkeley.EDU (8.12.7/8.12.7/3.141592645) with ESMTP id j1MKFCIh017800; Tue, 22 Feb 2005 12:15:12 -0800 (PST) Received: from tully.CS.Berkeley.EDU (hilfingr@localhost) by tully.CS.Berkeley.EDU (8.12.7/8.12.7/Submit) with ESMTP id j1MKFB1q017797; Tue, 22 Feb 2005 12:15:11 -0800 (PST) Message-Id: <200502222015.j1MKFB1q017797@tully.CS.Berkeley.EDU> To: tj <999alfred@comcast.net> cc: gdb@sources.redhat.com Subject: Re: Still problems with gdb and nested functions. In-Reply-To: Message from tj <999alfred@comcast.net> of "Tue, 22 Feb 2005 14:17:42 EST." <421B8556.6070905@comcast.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <17793.1109103311.1@tully.CS.Berkeley.EDU> Date: Tue, 22 Feb 2005 20:27:00 -0000 From: Paul Hilfinger X-SW-Source: 2005-02/txt/msg00138.txt.bz2 > #include > > int main(int argc, char *argv[]){ > > int i,j; > > int inside(void){ > int k,l; > > k = 1; > l = k; > printf("inside, k = %d, l = %d\n", k,l); > return 0; > > } > > inside(); > i = 0; > j = 1; > } > .... > Breakpoint 1, inside.0 () at test.c:12 > 12 printf("inside, k = %d, l = %d\n", k,l); > (gdb) p k > No symbol "k" in current context. I presume you have confirmed that k is actually there (since it is set only from a constant, it could be folded away even without fancy optimization). Paul Hilfinger