This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 01/23] dwarf: add dwarf3 DW_OP_push_object_address opcode
- From: Keven Boell <keven dot boell at linux dot intel dot com>
- To: Tom Tromey <tromey at redhat dot com>, Keven Boell <keven dot boell at intel dot com>
- Cc: gdb-patches at sourceware dot org, sanimir dot agovic at intel dot com
- Date: Wed, 11 Jun 2014 14:30:06 +0200
- Subject: Re: [PATCH 01/23] dwarf: add dwarf3 DW_OP_push_object_address opcode
- Authentication-results: sourceware.org; auth=none
- References: <1401861266-6240-1-git-send-email-keven dot boell at intel dot com> <1401861266-6240-2-git-send-email-keven dot boell at intel dot com> <87fvjj5biw dot fsf at fleche dot redhat dot com>
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
>