[Dwarf-discuss] Constant expressions in locations lists
Chris Quenelle
Chris.Quenelle@Sun.COM
Thu Mar 8 21:04:25 GMT 2007
I like Cary's idea to help describe the rules we already have in
place for expressions.
I don't like the idea of using DW_AT_location to describe a constant
value for a variable. It's confusing.
It might be more understandable to add DW_AT_value as an attribute,
make it work just like DW_AT_location, but have it imply that the result
of evaluating the stack is a value instead of a location.
(It could be used as a super-set of DW_AT_location)
Of course, the whole idea that it points to a "location list"
is also confusing....
--chris
Cary Coutant wrote:
> - The DW_OP_const* and DW_OP_lit* operators push an integer onto the
> stack.
> - The DW_OP_reg* operators push a register name.
> - The DW_OP_constant_value operator pushes a constant value.
> - The DW_OP_piece (and DW_OP_bit_piece, if that's in yet) operator
> can consume any one of the other three types, and pushes a "piece"
> back onto the stack.
> - Most of the remaining operators consume one or two integers and
> push an integer.
More information about the Dwarf-discuss
mailing list