From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30820 invoked by alias); 13 Apr 2002 19:53:37 -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 30812 invoked from network); 13 Apr 2002 19:53:36 -0000 Received: from unknown (HELO mx04.nexgo.de) (151.189.8.80) by sources.redhat.com with SMTP; 13 Apr 2002 19:53:36 -0000 Received: from einstein.home-of-linux.org (dialin-212-144-185-228.arcor-ip.net [212.144.185.228]) by mx04.nexgo.de (Postfix) with ESMTP id 3BB2E37D3A; Sat, 13 Apr 2002 21:53:25 +0200 (CEST) Received: by einstein.home-of-linux.org (Postfix, from userid 1001) id DB51720010; Sat, 13 Apr 2002 20:52:21 +0200 (CEST) To: Daniel Jacobowitz Cc: gdb@sources.redhat.com, Momchil Velikov Subject: Re: Lifetime of local variables References: <86u1qghdp5.fsf@einstein.home-of-linux.org> <20020412194304.B11562@nevyn.them.org> <86bscnesxy.fsf@einstein.home-of-linux.org> <20020413143246.B13608@nevyn.them.org> From: Martin Baulig Date: Sat, 13 Apr 2002 12:53:00 -0000 In-Reply-To: <20020413143246.B13608@nevyn.them.org> Message-ID: <86vgav77oa.fsf@einstein.home-of-linux.org> User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-04/txt/msg00235.txt.bz2 Daniel Jacobowitz writes: > On Sat, Apr 13, 2002 at 01:31:05PM +0200, Martin Baulig wrote: > > Daniel Jacobowitz writes: > > > Also, I believe that this should be entirely subsumed by .debug_loc. > > > The first variable's value may no longer be available, but it has not > > > actually gone out of scope, has it? We should list it but claim that > > > its value is unavailable. > > > > It has actually gone out of scope. I want to use this to debug machine > > generated IL code and the JIT may want to create local variables > > on-the-fly. For variables which have actually been defined by a human > > programmer, listing them and claiming that their value is no longer > > available is IMHO the right thing to do - but I'd like to tell the > > debugger to make a machine-generated variable disappear when it's no > > longer used, otherwise you'd get a large number of automatic variables > > (having numbers, not names, which makes it even more confusing to the > > user) and only a very few of them are actually used. > > What business does the JIT have actually creating local variables > (rather than temporaries, which don't get names)? I don't understand. What's the difference between a local variable and a temporary variable ? > > Btw. are there any plans to implement .debug_loc anytime soon, I need > > this for something else ? > > I believe it's in progress. Well, this is probably the correct place to put this (and then use DW_AT_artificial or something like this to make the variables disappear outside their lifetime). > On Sat, Apr 13, 2002 at 02:42:14PM +0200, Martin Baulig wrote: > > Momchil Velikov writes: > > > One can use DT_AT_artificial to distinguish machine generated > > > temporaries and the .debug_loc ranges to decide whether to display the > > > variable. > > > > What happens if you're outside any of the ranges listed in .debug_loc - > > will the variable be listed or not or will this depend on DW_AT_artificial ? > > > > IMHO variables which have been created by a human should always be > > listed, but machine generated ones (since there can be a large number > > of them) should only be listed withing their lifetime ranges. > > We don't know yet, since DW_AT_artificial is currently only used for > method arguments (and methods, but that patch is pending). Once we've > got .debug_loc we can decide, but this seems reasonable to me. > > > -- > Daniel Jacobowitz Carnegie Mellon University > MontaVista Software Debian GNU/Linux Developer > -- Martin Baulig martin@gnome.org