[Dwarf-discuss] Interpretation of FBREG: implied deref of frame_base?
Daniel Jacobowitz
drow
Wed Apr 20 14:49:46 GMT 2005
On Wed, Apr 20, 2005 at 01:45:57PM -0500, jeff nelson wrote:
> So far I'd say there is no striking consensus except that the
> description of FBREG could be made more clear. There are some who think
> there should be an automatic dereference and some that don't.
>
> Recall that there are two independent expressions being evaluated: the
> DW_OP_fbreg itself, and the expression at DW_AT_frame_base.
>
> If I understand correctly, those who suggest that an automatic deference
> should be performed are in effect saying that FBREG works like this:
>
> 1. evaluate the DW_AT_frame_base expression
> 2. dereference the value from step 1
> 3. add the DW_OP_fbreg operand
>
> One of the problems with this approach is that the compiler must
> construct a DW_AT_frame_base expression that yields the *address* of the
> value. While it's easy to see how this is done for registers, how about
> for a memory location? Now you need an address of an address. I believe
> this is an unreasonable interpretation.
I prefer this:
2. Interpret the result from step 1 as a value.
For an address, it's an address. For a register, it's the contents of
the register.
--
Daniel Jacobowitz
CodeSourcery, LLC
More information about the Dwarf-discuss
mailing list