From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10675 invoked by alias); 5 May 2003 14:59:08 -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 10668 invoked from network); 5 May 2003 14:59:08 -0000 Received: from unknown (HELO crack.them.org) (146.82.138.56) by sources.redhat.com with SMTP; 5 May 2003 14:59:08 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 19ChR9-0003lc-00; Mon, 05 May 2003 09:59:27 -0500 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 19ChQl-0007lC-00; Mon, 05 May 2003 10:59:03 -0400 Date: Mon, 05 May 2003 14:59:00 -0000 From: Daniel Jacobowitz To: Andrew Cagney Cc: Mark Kettenis , gdb-patches@sources.redhat.com Subject: Re: [PATCH/i386newframe/RFC] DWARF CFI frame unwinder Message-ID: <20030505145903.GA29766@nevyn.them.org> Mail-Followup-To: Andrew Cagney , Mark Kettenis , gdb-patches@sources.redhat.com References: <200305042207.h44M7gNG023734@elgar.kettenis.dyndns.org> <3EB5DBFF.6030009@redhat.com> <20030505034242.GA21263@nevyn.them.org> <3EB67056.4070209@redhat.com> <20030505142705.GA28866@nevyn.them.org> <3EB67AC6.2050407@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3EB67AC6.2050407@redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-05/txt/msg00066.txt.bz2 On Mon, May 05, 2003 at 10:52:54AM -0400, Andrew Cagney wrote: > > >>>The frame's CFA is the basis for identifying the frame and locating > >>>saved registers in the CFI. It is always present when you have CFI. > >>> > >>>DW_AT_frame_base is the basis for locating saved variables and locals. > >>>It is generally present when you have DWARF-2 debug info. > > > >> > >>You and I went through all this not too long ago. frame-base is for > >>this high level thingie, frame-unwind is for the low level register > >>information. > > > > > >Then, as Mark said, it shouldn't be providing a frame base at all. The > >CFA information is not the right frame base, and the use of > >DW_AT_frame_base is exactly orthogonal to the use of CFI. > > Daniel, you and I went through all this not too long ago. > > Not providing a dwarf2 specific frame-base (returning DW_AT_frame_base) > leads to ``info frame'' printing inconsistent information. It will > report ``id.stack_addr'' as the frame's base and that is definitly not > correct - it won't match the high level ``base'' that the user expects > to match a disassembler. > > Again, this is why the high level frame-base is separate to the low > level frame-unwind. It is possible to mix 'n' match. > > However, it doesn't need to be implemented right now - at present > dwarf2loc short circutes frame-base, implementing DW_AT_frame_base locally. I think we've managed to end up in violent agreement. Since right now the frame base is associated with the unwinder, shall we leave it as the CFA with a comment saying something like: /* When we have DWARF-2 debugging information, this should be DW_AT_frame_base. It should probably be provided by a method specific to the function's debug information instead of its unwind type. */ Not sure I got the wording right. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer