This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA v2 16/17] Convert dwarf_expr_context_funcs to methods
On 10/13/2016 10:10 PM, Tom Tromey wrote:
> This patch converts the function pointers in dwarf_expr_context_funcs
> into methods on dwarf_expr_context, and then updates the various
> implementations and callers to follow.
>
> NB this patch uses "override" (which caught a couple of renaming bugs
> during development) -- but this is C++11, so this patch at least has
> to wait for Pedro's patch that adds the OVERRIDE macro.
>
> After this patch it would be possible to do one more, that makes
> various members of dwarf_expr_context "protected"; but I haven't done
> this.
> case DW_OP_GNU_addr_index:
> op_ptr = safe_read_uleb128 (op_ptr, op_end, &uoffset);
> - result = (this->funcs->get_addr_index) (this->baton, uoffset);
> + result = (this->get_addr_index) (uoffset);
Should we remove the parens throughout?
> + /* Push on DWARF stack an entry evaluated for DW_TAG_GNU_call_site's
> + parameter matching KIND and KIND_U at the caller of specified BATON.
> + If DEREF_SIZE is not -1 then use DW_AT_GNU_call_site_data_value instead of
> + DW_AT_GNU_call_site_value. */
> + virtual void push_dwarf_reg_entry_value (enum call_site_parameter_kind kind,
> + union call_site_parameter_u kind_u,
> + int deref_size)
> + {
> + internal_error (__FILE__, __LINE__,
> + _("Support for DW_OP_GNU_entry_value is unimplemented"));
Hmm, I think you may have missed my comments to this patch in v1.
Thanks,
Pedro Alves