Re: [rfa/6.0] Better handle unspecified CFI values

Daniel Jacobowitz
2003-09-10T19:53:07Z

On Wed, Sep 10, 2003 at 12:47:54PM -0700, Richard Henderson wrote:
> On Mon, Sep 08, 2003 at 11:30:53PM -0400, Daniel Jacobowitz wrote:
> > We can only compute expressions
> > describing a memory location where the register is saved, not computed
> > values.
>
> False. See DW_CFA_expression.

True. See DW_CFA_expression.

20. DW_CFA_expression

The DW_CFA_expression instruction takes two operands: an unsigned
LEB128 value representing a register number, and a DW_FORM_block
value representing a DWARF expression. The required action is to
establish the DWARF expression as the means by which the address in
which the given register contents are found may be computed. The
value of the CFA is pushed on the DWARF evaluation stack prior to
execution of the DWARF expression.

The DW_OP_call2, DW_OP_call4, DW_OP_call_ref and
DW_OP_push_object_address DWARF operators (see Section 2.4.1)
cannot be used in such a DWARF expression.

It computes "the address in which the given register contents are
found". That's not ambiguous, and that's precisely how GCC uses it:
_Unwind_SetGRPtr (context, i, (void *) val);

--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer