From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18766 invoked by alias); 8 Feb 2013 11:52:19 -0000 Received: (qmail 18756 invoked by uid 22791); 8 Feb 2013 11:52:19 -0000 X-SWARE-Spam-Status: No, hits=-5.6 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 08 Feb 2013 11:52:12 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r18BqCJd023992 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 8 Feb 2013 06:52:12 -0500 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r18BqA1q029813 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 8 Feb 2013 06:52:11 -0500 From: Tom Tromey To: Jan Kratochvil Cc: gdb-patches@sourceware.org Subject: Re: [3/3] unconditionally call via SYMBOL_COMPUTED_OPS References: <871udlhzzb.fsf@fleche.redhat.com> <20130207163233.GA15297@host2.jankratochvil.net> Date: Fri, 08 Feb 2013 11:52:00 -0000 In-Reply-To: <20130207163233.GA15297@host2.jankratochvil.net> (Jan Kratochvil's message of "Thu, 7 Feb 2013 17:32:33 +0100") Message-ID: <87d2wbt445.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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 X-SW-Source: 2013-02/txt/msg00207.txt.bz2 >>>>> "Jan" == Jan Kratochvil writes: Jan> Without the full virtualization / unconditional calls via Jan> SYMBOL_COMPUTED_OPS I do not understand this patch and I am against Jan> it. This was troubling me yesterday and I finally remembered that I did implement the needed change, but in a non-obvious way. I now think either your analysis is incorrect or I didn't understand it. Basically, it is register_symbol_alias_impl that does the work. For a function, dwarf2_symbol_mark_computed uses the _block indices, e.g.: + SYMBOL_ACLASS_INDEX (sym) = (is_block + ? dwarf2_loclist_block_index + : dwarf2_loclist_index); These are registered as aliases of LOC_BLOCK: + dwarf2_loclist_block_index = register_symbol_alias_impl (LOC_BLOCK); What this means is that the resulting symbol will have LOC_BLOCK and a SYMBOL_LOCATION_BATON, but SYMBOL_COMPUTED_OPS will be NULL. So, the various calls via the vtable will never be taken. Jan> I had problems cleaning up patch 2/2 now because issues brought in Jan> by this patch 3/3 and I find this patch 3/3 is the inappropriate Jan> one. Ah, I see. Your follow-on patch restored the vtable in all cases. This isn't correct according to the approach of patch #3 and the design implied by the comments and the PR. I tend to like the approach taken in the patch because it is more flexible. If you disagree I would like to understand why. Tom