From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18865 invoked by alias); 12 Apr 2002 23:42:53 -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 18858 invoked from network); 12 Apr 2002 23:42:50 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by sources.redhat.com with SMTP; 12 Apr 2002 23:42:50 -0000 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 16wAh6-000374-00 for ; Fri, 12 Apr 2002 19:43:04 -0400 Date: Fri, 12 Apr 2002 16:42:00 -0000 From: Daniel Jacobowitz To: gdb@sources.redhat.com Subject: Re: Lifetime of local variables Message-ID: <20020412194304.B11562@nevyn.them.org> Mail-Followup-To: gdb@sources.redhat.com References: <86u1qghdp5.fsf@einstein.home-of-linux.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86u1qghdp5.fsf@einstein.home-of-linux.org> User-Agent: Mutt/1.3.23i X-SW-Source: 2002-04/txt/msg00225.txt.bz2 On Fri, Apr 12, 2002 at 10:19:50PM +0200, Martin Baulig wrote: > Hi, > > I was recently working a bit on debugging support for C# (using Mono) > and I need a way to tell GDB about the lifetime of local variables. In > C#, the JIT engine may decide to store two different variables at the > same stack offset if they aren't used throughout the whole function. > > Now I was wondering how to do this - DWARF 2 already has a > `DW_AT_begin_scope' but unfortunately no `DW_AT_end_scope' - can we > add this or something similar as a GNU extension ? No. I'd strongly object to adding any DWARF-2 tags without at least discussing them with the DWARF committee (which is quite responsive, I believe). 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. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer