From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5263 invoked by alias); 5 Sep 2003 23:03:23 -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 5253 invoked from network); 5 Sep 2003 23:03:22 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 5 Sep 2003 23:03:22 -0000 Received: from drow by nevyn.them.org with local (Exim 4.22 #1 (Debian)) id 19vPbs-0000dU-DH; Fri, 05 Sep 2003 19:03:20 -0400 Date: Fri, 05 Sep 2003 23:03:00 -0000 From: Daniel Jacobowitz To: Jafa Cc: gdb@sources.redhat.com Subject: Re: FP vs SP Message-ID: <20030905230319.GA30712@nevyn.them.org> Mail-Followup-To: Jafa , gdb@sources.redhat.com References: <003301c373ff$3a923160$0502a8c0@scenix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <003301c373ff$3a923160$0502a8c0@scenix.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-09/txt/msg00078.txt.bz2 On Fri, Sep 05, 2003 at 03:44:13PM -0700, Jafa wrote: > Hi all, > > I recently updated the ip2k gdb port to use the new frame handling support > in gdb. > > It can reliably do a stack backtrace and can reliably step-over etc. > > The one problem is that all local variables show up as garbage. > > I have looked into this and it seams that GDB is using the frame-pointer > (aka SP as at the entry point of the function) as the reference point for > the stack offset of the local variables. Is this correct or have I screwed > up something in my frame handling code? > > Looking at the stabs information coming out of gcc (2.97) the offsets are > all specified as being relative to the nominal SP (stack pointer at the > start of any c-line)... is this correct or should it be giving FP relative > addresses? You can control what GDB does here by defining a frame base method - see frame-base.h. Probably you've changed the meaning of get_frame_locals_address (). -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer