From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28651 invoked by alias); 5 May 2003 03:42:47 -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 28642 invoked from network); 5 May 2003 03:42:46 -0000 Received: from unknown (HELO crack.them.org) (146.82.138.56) by sources.redhat.com with SMTP; 5 May 2003 03:42:46 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 19CWsb-0002xb-00; Sun, 04 May 2003 22:43:05 -0500 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 19CWsE-0005Xg-00; Sun, 04 May 2003 23:42:42 -0400 Date: Mon, 05 May 2003 03:42: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: <20030505034242.GA21263@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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3EB5DBFF.6030009@redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-05/txt/msg00056.txt.bz2 On Sun, May 04, 2003 at 11:35:27PM -0400, Andrew Cagney wrote: > Mark, fyi, > > >+ case REG_SAVED_REG: > >+ *optimizedp = 0; > >+ *lvalp = lval_register; > >+ *addrp = 0; > >+ *realnump = DWARF2_REG_TO_REGNUM (cache->reg[regnum].loc.reg); > >+ if (valuep) > >+ { > >+ /* Read the value from the register. */ > >+ frame_unwind_register (next_frame, *realnump, valuep); > >+ } > >+ break; > >+ > > Set *addrp to the register offset hack (Otherwize something mysterious > fails. What? I don't remember). > > Using the frame obstack for memory looks right. > > >+static CORE_ADDR > >+dwarf_frame_base_address (struct frame_info *next_frame, void > >**this_cache) > >+{ > >+ struct dwarf_frame_cache *cache = dwarf_frame_cache (next_frame, > >this_cache); > >+ > >+ return cache->cfa; > >+} > > This isn't right. It should return DW_AT_frame_base. However, since > dwarf2expr.c doesn't yet use these methods it doesn't [?] really matter. > Only affects ``info frame''. I don't think it should. 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. The two are not necessarily related. I don't remember how we settled on providing DW_AT_frame_base. Possibly a debug info auxiliary to the function symbol or to the block. By the way, I don't remember something else I believe we've discussed... Does each target that wants to use the CFI unwinder have to add it in its gdbarch initialization? -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer