From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16817 invoked by alias); 22 May 2007 08:40:32 -0000 Received: (qmail 16806 invoked by uid 22791); 22 May 2007 08:40:31 -0000 X-Spam-Check-By: sourceware.org Received: from hq.tensilica.com (HELO mailapp.tensilica.com) (65.205.227.29) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 22 May 2007 08:40:29 +0000 Received: from localhost ([127.0.0.1]) by mailapp.tensilica.com with esmtp (Exim 4.34) id 1HqPum-0002WY-RN; Tue, 22 May 2007 01:40:20 -0700 Received: from mailapp.tensilica.com ([127.0.0.1]) by localhost (mailapp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 09389-05; Tue, 22 May 2007 01:40:20 -0700 (PDT) Received: from nose.hq.tensilica.com ([192.168.11.18]) by mailapp.tensilica.com with esmtp (Exim 4.34) id 1HqPum-0002WS-CQ; Tue, 22 May 2007 01:40:20 -0700 Message-ID: <4652AC74.9050100@tensilica.com> Date: Tue, 22 May 2007 08:40:00 -0000 From: Ross Morley User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040805 Netscape/7.2 MIME-Version: 1.0 To: Daniel Jacobowitz CC: Nick Roberts , Maxim Grigoriev , gdb@sourceware.org, Marc Gauthier , Pete MacLiesh Subject: Re: Understanding GDB frames References: <46521C04.7040405@hq.tensilica.com> <46522B10.6090008@tensilica.com> <18002.20463.147887.664973@kahikatea.snap.net.nz> <20070522023125.GB19198@caradoc.them.org> In-Reply-To: <20070522023125.GB19198@caradoc.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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-05/txt/msg00104.txt.bz2 Daniel Jacobowitz wrote: >On Tue, May 22, 2007 at 02:05:35PM +1200, Nick Roberts wrote: > > >>As watchpoints? I don't think so. A closer analogy to variable objects >>is the "display" command. There, GDB allows expressions to come back into >>scope. >> >> > >I don't think that allowing varobjs to come back into scope this way >is really useful. > > I agree, since there's no way of knowing it's really the same variable. Using a C language definition of scope (and most languages are similar) a variable with the same name in a different scope is a different variable. >There's a different sort of scope that does make sense - a varobj >might come in and out of lexical scope while its frame is live, due to >optimization. But once the frame has gone we should recreate the >varobjs, or else we should associate them with the function instead of >the frame. > > Associating them with the function has problems with recursion. It seems to me the ideal is to recreate vars that have gone out of scope (they really are new vars). Use of a scope breakpoint can better detect that than the current methods. However, are there implementation or performance issues? Ross