From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11466 invoked by alias); 2 Oct 2003 17:54:35 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 11454 invoked from network); 2 Oct 2003 17:54:33 -0000 Received: from unknown (HELO zenia.home) (12.223.225.216) by sources.redhat.com with SMTP; 2 Oct 2003 17:54:33 -0000 Received: by zenia.home (Postfix, from userid 5433) id 617CC20766; Thu, 2 Oct 2003 12:54:32 -0500 (EST) To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com, dberlin@dberlin.org Subject: Re: RFA: DW_AT_frame_base fix for complicated frames References: <20031002165606.GA22819@nevyn.them.org> From: Jim Blandy Date: Thu, 02 Oct 2003 17:54:00 -0000 In-Reply-To: <20031002165606.GA22819@nevyn.them.org> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-10/txt/msg00034.txt.bz2 Daniel Jacobowitz writes: > Does anyone remember a specific reason why this code was there? I don't, > and I rewrote all of this stuff... I am 99.99% sure it's based on the unwind > handling for saved registers, where we get either a register number or the > address of a stack slot. But for frame bases that's not true: > > A subroutine or entry point entry may also have a DW_AT_frame_base > attribute, whose value is a location description that computes the "frame > base" for the subroutine or entry point. > > i.e. it computes the frame base. Not the address of the frame base. This > memory read tends to find (on x86) the return address, and then we think the > stack is at . Oopsie. > > OK? With this patch and some code Daniel Berlin and Joseph are working on, > location lists actually work. I can see all the arguments in an > -fomit-frame-pointer function from the beginning. It's really quite cool. I think you're right, there's no reason for that memory fetch to be there. Please commit.