From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25591 invoked by alias); 27 Jun 2013 20:42:10 -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 25576 invoked by uid 89); 27 Jun 2013 20:42:09 -0000 X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=no 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; Thu, 27 Jun 2013 20:42:08 +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 r5RKg4rU018833 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 27 Jun 2013 16:42:05 -0400 Received: from barimba (ovpn-113-102.phx2.redhat.com [10.3.113.102]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r5RKg39W020011 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 27 Jun 2013 16:42:03 -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> Date: Thu, 27 Jun 2013 20:43:00 -0000 In-Reply-To: <1372043502-4618-1-git-send-email-yao@codesourcery.com> (Yao Qi's message of "Mon, 24 Jun 2013 11:11:42 +0800") Message-ID: <874ncjmgkl.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-06/txt/msg00862.txt.bz2 >>>>> "Yao" == Yao Qi writes: Yao> The rationale of this patch is to fix up the type of minimal symbol to Yao> "mst_solib_trampoline" when reading the file if the minimal symbol is Yao> a dll trampoline. We find that there is always a symbol "_impl_foo" Yao> coexists with dll trampoline "foo" in the current minimal symbols red Yao> in. Our approach is to collect all minimal symbols which name has Yao> prefix "_imp_", remove the prefix, and find minimal symbols. If Yao> found, it is a dll trampoline. This seems reasonable to me. Yao> + minimal symbols just red in by matching the minimal symbol name s/red/read/ Yao> + char *buffer = xstrdup (SYMBOL_LINKAGE_NAME (msym_dll)); I don't think you need to copy the name here. Yao> +/* Look for the minimal symbol which name is NAME. Return NULL if not "whose name". I think this comment needs to be expanded (and moved, see below). It should at least mention that this only searches minsyms that are currently being constructed. Otherwise it isn't clear why you would use this function as opposed to lookup_minimal_symbol_and_objfile. Yao> +struct minimal_symbol* prim_find_minimal_symbol (const char *name); The comment should go here, the way it does for other functions in the minsyms module. Also, the first "*" is in the wrong place. thanks, Tom