This is the mail archive of the
mailing list for the GDB project.
Re: FP vs SP
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Jafa <jafa at silicondust dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Fri, 5 Sep 2003 19:03:20 -0400
- Subject: Re: FP vs SP
- References: <firstname.lastname@example.org>
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
You can control what GDB does here by defining a frame base method -
see frame-base.h. Probably you've changed the meaning of
MontaVista Software Debian GNU/Linux Developer