[Dwarf-discuss] Interpretation of FBREG: implied deref of frame_base?
Daniel Jacobowitz
drow
Thu Apr 21 15:19:50 GMT 2005
On Thu, Apr 21, 2005 at 02:50:24PM -0400, Ron 603-884-2088 wrote:
> I propose the following replacement:
>
> A subroutine or entry point may also have a DW_AT_frame_base
> attribute, whose value is a location description. Evaluation
> of that location description computes the "frame base"
> address, which can serve as a base pointer for accessing
> locations in the frame of that subroutine or entry. In the
> special case that the location expression is one of the
> register name operators (see Section 2.5.1), the given
> register is implicitly dereferenced to obtain the contents
> of the register.
You're propogating the use of "dereference" to express what happens
here, and I don't think it's a good term. Here's an example of why:
> <i>For example, for the DW_AT_frame_base attribute (and
> only that attribute) the location expression DW_OP_reg7
> is equivalent to either of the expressions
> <b>DW_OP_reg7 DW_OP_deref</b> or <b>DW_OP_breg7 0</b></i>.
I would interpret DW_OP_reg7 DW_OP_deref as "take the _contents_ of
reg7 and dereference that". Or else just as nonsensical.
Basically, in the top level of a location description, DW_OP_reg7
refers to the location that is a register. But inside expression
evaluation, the only meaningful interpretation is the contents of the
register.
--
Daniel Jacobowitz
CodeSourcery, LLC
More information about the Dwarf-discuss
mailing list