From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15985 invoked by alias); 10 Jul 2013 16:56:38 -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 15975 invoked by uid 89); 10 Jul 2013 16:56:38 -0000 X-Spam-SWARE-Status: No, score=-6.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS,TW_BJ autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 10 Jul 2013 16:56:37 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r6AGuZqW007250 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 10 Jul 2013 12:56:35 -0400 Received: from barimba (ovpn-113-131.phx2.redhat.com [10.3.113.131]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r6AGuX87008221 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 10 Jul 2013 12:56:34 -0400 From: Tom Tromey To: Yao Qi Cc: Subject: Re: [PATCH] Fix up msymbol type of dll trampoline to mst_solib_trampoline References: <1372043502-4618-1-git-send-email-yao@codesourcery.com> <874ncjmgkl.fsf@fleche.redhat.com> <51CD0054.9040401@codesourcery.com> <87ehbmkzqr.fsf@fleche.redhat.com> <51D36FB3.4070006@codesourcery.com> Date: Wed, 10 Jul 2013 16:56:00 -0000 In-Reply-To: <51D36FB3.4070006@codesourcery.com> (Yao Qi's message of "Wed, 3 Jul 2013 08:26:27 +0800") Message-ID: <87vc4igxq6.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-07/txt/msg00279.txt.bz2 >>>>> "Yao" == Yao Qi writes: Yao> That is, after the hash table of minsyms of OBJFILE is built up, we Yao> can iterate all minsyms, if symbol is _imp_x, look up x in the hash Yao> table. If found, modify the found's type. Yao> + for (i = objfile->minimal_symbol_count; i > 0; i--) This should use ALL_OBJFILE_MSYMBOLS. I'm mildly concerned that this exposes an implementation detail of the minsym storage -- namely, it assumes that it is ok to modify a minsym after the minsym is installed. This approach would also block constification of the minsym API. Neither of these seem like blocking considerations though. Presumably bugs arising from the first would be caught in testing; and for the second, casting away const would be obviously ok. So, ok with the ALL_OBJFILE_MSYMBOLS change. Tom