From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 58305 invoked by alias); 13 Oct 2016 23:05:44 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 58284 invoked by uid 89); 13 Oct 2016 23:05:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1477, KIND X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 13 Oct 2016 23:05:42 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9D8DF61E4C; Thu, 13 Oct 2016 23:05:41 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u9DN5eHU009817; Thu, 13 Oct 2016 19:05:41 -0400 Subject: Re: [RFA v2 16/17] Convert dwarf_expr_context_funcs to methods To: Tom Tromey , gdb-patches@sourceware.org References: <1476393012-29987-1-git-send-email-tom@tromey.com> <1476393012-29987-17-git-send-email-tom@tromey.com> From: Pedro Alves Message-ID: <94f5892b-e4d2-f903-36e2-513e37f3947b@redhat.com> Date: Thu, 13 Oct 2016 23:05:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1476393012-29987-17-git-send-email-tom@tromey.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-10/txt/msg00425.txt.bz2 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