From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1390 invoked by alias); 17 Mar 2003 16:56:45 -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 1316 invoked from network); 17 Mar 2003 16:56:44 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by sources.redhat.com with SMTP; 17 Mar 2003 16:56:44 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id DA53E2B11; Mon, 17 Mar 2003 11:56:40 -0500 (EST) Message-ID: <3E75FE48.9000104@redhat.com> Date: Mon, 17 Mar 2003 16:56:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Jacobowitz Cc: gdb@sources.redhat.com Subject: Re: frame->unwind->this_base() References: <3E74F4F4.50003@redhat.com> <20030316221008.GA19037@nevyn.them.org> <3E75121F.4030405@redhat.com> <20030317001407.GA20827@nevyn.them.org> <3E75F64B.5040700@redhat.com> <20030317163843.GA11494@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-03/txt/msg00257.txt.bz2 > On Mon, Mar 17, 2003 at 11:22:35AM -0500, Andrew Cagney wrote: > >> > >> >>However, shouldn't the only thing needing the `virtual frame pointer' / >> >>get_frame_base() be the code that needs a virtual base pointer when >> >>computing the value of a local variable? > >> > >> > >> >Yes, and that's the only time that we search for the frame base. But >> >what difference does it make? > >> >> (gdb) info frame >> >> will display the correct value. > > > What does "correct" mean though? Display the frame's `virtual base pointer'. >> >At that point we have an offset that we >> >know is relative to DW_AT_frame_base, but we don't know if it's >> >relative to what the rest of GDB considers the frame base (since we >> >never use DW_AT_frame_base to compute the frame base in the first >> >place; and it's not clear to me that we should be). > >> >> Where, apart from `info frame', and variable evaluation, is it correct >> for GDB to use the frame base? > > > I'm sorry, but I just don't understand what you're asking. We use the > frame base all over. > > The current frame base (i.e. id.base) is produced by target specific > code - often via prologue analysis; on x86-64 via CFI; etc. Er, > GDB's frame code also makes available the get_frame_base() method. While the default implementation returns get_frame_id().base, I think there is going to need to be a per-frame frame->unwind->this_base method. get_frame_base() returns ->frame and NOT ->id.base. Andrew