Eric Botcazou wrote:
The CIE says what the RA column is, but there is no initial value
location expression generated for the return address.  That means
that on entry to a function, the CIE cannot be used to tell what
the return address is.

I'm not sure I understand. The RA column is the column in the table which represents the return address, so the return address is the value contained in that column on function entry. On SPARC, it's by convention the value contained in %o7 as far as the CFI are concerned.

The CIE doesn't say that.  The column has no initial value.

sparc-gdb knows that the RA is in %o7+8 from the ABI.  But if it used
the DWARF data to figure this out, it would know nothing.

The macro is INCOMING_RETURN_ADDR_RTX.

But you explained in your previous message that it is not fully honored, didn't you? Instead, RETURN_ADDR_OFFSET is used by the unwinder through __builtin_extract_return_addr, see the code in unwind-dw2.c.

Not by GDB.

Other than the code which translates RTL to LocExpr not handling
REG+offset, I don't see a reason why REG+OFFSET is not valid, or why the
comment says that it is unnecessary.

If the offset is small (1 jump instruction on SPARC), it doesn't really matter for unwinding.

On Sparc, it's only unnecessary because Sparc ignores the CIE.

No, the GCC unwinder does make use of the CIE on SPARC, see extract_cie_info in unwind-dw2.c.

You seem to be under the misapprehension that I'm talking about exception
handling in gcc.  I'm not.

--
Michael Eager    [EMAIL PROTECTED]
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077

Reply via email to