Re: info frame

Nick Roberts
2006-04-17T05:57:05Z

> > >> 553^done,stack=[frame=
> > >> {level="0",addr="0x00003db0",fp="0xbffff2c0",......
> >
> > 0xbffff2c0 should not be the value of $fp but the value of "frame at..." in
> > 'info frame`?
>
> In fact, it's like that it will be the "frame at" address. But I don't
> think it would be wise to architect that into the interface; I think I
> explained why earlier, but if not, it's because this is a touchy
> internal interface for GDB. If you want to display it to the user, you
> might want something different - either explicitly the $sp, or
> explictly the architectural $fp register, or explicitly the call frame
> address. If you want to use it in a frontend, then all we should offer
> is an opaque ID for equality testing, IMHO.
>
> If GDB changes its internal representation we shouldn't have to update
> frontends.

I don't think it matters if the internal representation does change, so long as
its self consistent. As I mentioned before Totalview displays the fp address
of each frame in the call stack. It also displays the appropriate fp address
in the window of each watch expression (each expression has its own window).
That way, the fp address does act as an ID for the frame and the user can
easily see which frame the watch expression belongs to, but its actual value is
generally not of interest.

--
Nick http://www.inet.net.nz/~nickrob