Re: [PATCH/i386newframe/RFC] DWARF CFI frame unwinder

Daniel Jacobowitz
2003-05-05T14:27:16Z

On Mon, May 05, 2003 at 10:08:22AM -0400, Andrew Cagney wrote:
>
> >>
> >>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.
>
> Er ...
>
> >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.

> >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?
>
> At present yes.
>
> Given the amount of upheval required before a target will work with this
> code, it doesn't really matter. As I,and now Mark, discovered, it is
> something of an all or nothing afair.

Sure, makes sense to me.

--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer