From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25781 invoked by alias); 1 Oct 2013 15:14:54 -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 25768 invoked by uid 89); 1 Oct 2013 15:14:54 -0000 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; Tue, 01 Oct 2013 15:14:54 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r91FEo0j004097 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 1 Oct 2013 11:14:51 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r91FEnke026388; Tue, 1 Oct 2013 11:14:50 -0400 Message-ID: <524AE6E9.8030505@redhat.com> Date: Tue, 01 Oct 2013 15:14:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Joel Brobecker CC: gdb-patches@sourceware.org Subject: Re: [RFA] Use FILENAME_CMP to compare filenames in compare_search_syms. References: <1380618427-27814-1-git-send-email-brobecker@adacore.com> <524A9BCF.90502@redhat.com> <20131001123031.GF2840@adacore.com> In-Reply-To: <20131001123031.GF2840@adacore.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-10/txt/msg00056.txt.bz2 On 10/01/2013 01:30 PM, Joel Brobecker wrote: >> I'd say that use of FILENAME_CMP instead of strcmp is an obvious change. >> >> However, this is not complete. This function is called by: > [...] >> But really, so that this sort of out-of-sync bugs doesn't >> happen, it'd be better if search_symbols_equal were reimplemented >> in terms of compare_search_syms or even be eliminated. > > Indeed! I'm turning this fix into a 2-patch series: > > 1. Delete search_symbols_equal > > This patch does not fix anything, other than removing the duplication. > > I pondered a bit over that change, thinking maybe we'd want > to keep it, just because the arguments have the right type > instead of "void *". In the end, I felt it was sufficiently > localized that deleting was OK. Putting it back is easy, > though, so whichever we want it shall be. This is fine with me. > * symtab.c (compare_search_syms): Use FILENAME_CMP instead of > strcmp to compare two symtab filenames. This one looks obvious to me. Thanks, -- Pedro Alves