From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10514 invoked by alias); 21 Jan 2013 19:10:05 -0000 Received: (qmail 10502 invoked by uid 22791); 21 Jan 2013 19:10:04 -0000 X-SWARE-Spam-Status: No, hits=-7.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS,TW_BJ 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, 21 Jan 2013 19:09:54 +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 r0LJ9rK8023399 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 21 Jan 2013 14:09:53 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r0LJ9qC7004394; Mon, 21 Jan 2013 14:09:52 -0500 Message-ID: <50FD927F.8030903@redhat.com> Date: Mon, 21 Jan 2013 19:10:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Tom Tromey CC: gdb-patches@sourceware.org Subject: Re: RFC: remove gnu_debuglink_crc32 References: <87sj5u1i08.fsf@fleche.redhat.com> In-Reply-To: <87sj5u1i08.fsf@fleche.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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-01/txt/msg00493.txt.bz2 On 01/21/2013 06:57 PM, Tom Tromey wrote: > I noticed that BFD has a function equivalent to gnu_debuglink_crc32. > There doesn't seem to be any reason to keep our own function, so this > patch removes it. Right. GDB gained the function first, and the bfd one was added afterwards: http://sourceware.org/ml/binutils/2003-01/msg00511.html "It has become clear recently that GDB is not the only program which would benefit from these separate packages; notably objdump and the oprofile post-processing tools require access to them. Rather than duplicate the same section-extracting, path-searching and checksum-matching code in these tools, it was suggested that we centralize the feature in binutils itself. " So your patch has been the intention all along. > > Built and regtested on x86-64 Fedora 16. > > There's some other overlap in this area, but I think we can't readily > share it due to gdb's support of remote files. > > Tom > > * symfile.c (get_file_crc): Use bfd_calc_gnu_debuglink_crc32. > * utils.c (gnu_debuglink_crc32): Remove. > * utils.h (gnu_debuglink_crc32): Don't declare. Looks good to me... -- Pedro Alves