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

Daniel Jacobowitz
2003-05-05T14:59:08Z

On Mon, May 05, 2003 at 10:52:54AM -0400, Andrew Cagney wrote:
>
> >>>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.
>
> Daniel, you and I went through all this not too long ago.
>
> Not providing a dwarf2 specific frame-base (returning DW_AT_frame_base)
> leads to ``info frame'' printing inconsistent information. It will
> report ``id.stack_addr'' as the frame's base and that is definitly not
> correct - it won't match the high level ``base'' that the user expects
> to match a disassembler.
>
> Again, this is why the high level frame-base is separate to the low
> level frame-unwind. It is possible to mix 'n' match.
>
> However, it doesn't need to be implemented right now - at present
> dwarf2loc short circutes frame-base, implementing DW_AT_frame_base locally.

I think we've managed to end up in violent agreement. Since right now
the frame base is associated with the unwinder, shall we leave it as
the CFA with a comment saying something like:

/* When we have DWARF-2 debugging information, this should be
DW_AT_frame_base. It should probably be provided by a method
specific to the function's debug information instead of its
unwind type. */

Not sure I got the wording right.

--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer