From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20159 invoked by alias); 26 Nov 2012 18:32:10 -0000 Received: (qmail 20149 invoked by uid 22791); 26 Nov 2012 18:32:09 -0000 X-SWARE-Spam-Status: No, hits=-5.9 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,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; Mon, 26 Nov 2012 18:31:59 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAQIVvnC011623 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 26 Nov 2012 13:31:57 -0500 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qAQIVtof011725 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 26 Nov 2012 13:31:56 -0500 From: Tom Tromey To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: FYI: use SYMBOL_SYMTAB accessor References: <87r4ngicmg.fsf@fleche.redhat.com> <20121126163706.GA3089@adacore.com> Date: Mon, 26 Nov 2012 18:32:00 -0000 In-Reply-To: <20121126163706.GA3089@adacore.com> (Joel Brobecker's message of "Mon, 26 Nov 2012 17:37:06 +0100") Message-ID: <87mwy4gqqs.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (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: 2012-11/txt/msg00679.txt.bz2 >>>>> "Joel" == Joel Brobecker writes: Joel> I am wondering if should consider making these structures opaque Joel> Aside from the amount of work to do in order to achieve that, Joel> do you see a negative is aiming for this goal for this particular Joel> struct? (and all the symtab-related structs)? Joel> [I've always wanted to make all complex and semi-complex structures Joel> opaque :-)] I'm somewhat on the fence about this, but on balance I think it is a good idea to make types that are used in more than one file opaque. However, in practice this hasn't always helped much. The symbol accessors are the worst, as we've discussed before, because many of them are polymorphic without any purpose -- so they are both verbose and hard to change. In other cases in recent memory, I've wanted to change direct accessors to separate assignments from uses; and this requires global changes anyway, meaning that the macros didn't really help all that much. Tom