From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19553 invoked by alias); 8 Oct 2003 05:09:00 -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 19546 invoked from network); 8 Oct 2003 05:08:58 -0000 Received: from unknown (HELO artax.karlin.mff.cuni.cz) (195.113.31.125) by sources.redhat.com with SMTP; 8 Oct 2003 05:08:58 -0000 Received: by artax.karlin.mff.cuni.cz (Postfix, from userid 29129) id B93093FA4; Wed, 8 Oct 2003 07:08:57 +0200 (CEST) Date: Wed, 08 Oct 2003 05:09:00 -0000 From: Josef Zlomek To: Daniel Berlin , Richard Henderson , gdb@sources.redhat.com Subject: Re: Problem with location lists and variables on stack Message-ID: <20031008050857.GA14575@artax.karlin.mff.cuni.cz> References: <20031001155417.GA13942@nevyn.them.org> <20031001160318.GA17042@artax.karlin.mff.cuni.cz> <20031001162255.GA25428@nevyn.them.org> <20031001174142.GA21499@artax.karlin.mff.cuni.cz> <20031001174427.GA13387@nevyn.them.org> <20031006062216.GB26462@redhat.com> <20031006064016.GA13046@artax.karlin.mff.cuni.cz> <20031006134604.GA31005@nevyn.them.org> <1BEF617C-F80C-11D7-8E4F-000A95AF1FAE@dberlin.org> <20031007214832.GA11708@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031007214832.GA11708@nevyn.them.org> User-Agent: Mutt/1.5.4i X-SW-Source: 2003-10/txt/msg00129.txt.bz2 > > >>Daniel Berlin has already written support for GCC to generate location > > >>list for DW_AT_frame_base. > > >>DW_AT_frame_base is a location list as any other (actually only the > > >>offsets relatively to original stack pointer at function start are > > >>needed). > > >>GDB then uses this location list to adjust offsets of other variables > > >>addressed using stack pointer. > > >>With Daniel Jacobowitz's fix for GDB it works :-) > > >>i.e. you can see correct values for variables located on stack > > >>even when stack pointer changes because of push, pop, etc. > > >> > > >>Current GCC patch can be downloaded from: > > >>http://artax.karlin.mff.cuni.cz/~zlomj9am/download/vt-main.patch > > >> > > >>(because currently GCC is in stage 2 it has to wait until GCC is in > > >>stage 1) > > > > > >I suppose this is true, but it's really unfortunate. > > > > I'm not so sure it's true. > > > > This isn't a major change, really and it's only going to make things > > better (We didn't use to support -O2 -g at all, really, and now we can. > > There can't be any regressions from an unsupported state to a > > supported one). It's also not an optimization pass, so the risk is > > relatively low. > > Well, FWIW I'd like to see this included. Josef, do you have any > interest in submiting it for 3.4, to see what reaction it gets at least? I'll try to submit it for 3.4. If it is disabled for default and enabled only explicitelly with -fvar-tracking the risk of breaking something will be very low. Anyway, I'm planning to commit it to hammer-3_3-branch (enabled by default) as soon as I backport some patches needed by variable tracking from mainline. Josef