Re: [PATCH 01/23] dwarf: add dwarf3 DW_OP_push_object_address opcode

Keven Boell
2014-06-11T12:30:12Z

Hi Tom,

I will set it to unimplemented for now like DW_OP_GNU_push_tls_address in the AX
part as I think this is a project by its own to implement such support here.
One needs to have more information for resolving a VLA's
address using DW_OP_push_object_address as the dwarf2_compile_expr_to_ax
and the callers of it seems to only have the variable location, which
isn't enough as one needs the data location, the bounds and the stride
to correctly resolve the address.

Keven

>>>>>> "Keven" == Keven Boell <keven.boell@intel.com> writes:
>
> Keven> The opcode pushes the address of the object being evaluated. The
> Keven> semantic is equivalent to the implicit push of the base address
> Keven> of a data member location.
>
> This looks good.
>
> However, normally if one updates the DWARF expression evaluator, one
> should either try to update the DWARF->AX translator in dwarf2loc.c, or
> provide some rationale explaining why it either can't be done or is
> otherwise undesirable. In this case I think the translation seems
> doable. See dwarf2_compile_expr_to_ax. There's also
> dwarf2read.c:decode_locdesc, but it is hackier and more likely to be
> ignorable.
>
> Tom
>