From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 110412 invoked by alias); 16 Feb 2017 20:01:04 -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 110403 invoked by uid 89); 16 Feb 2017 20:01:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=policy X-HELO: mx1.redhat.com 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; Thu, 16 Feb 2017 20:01:01 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F1E7DC04BD32; Thu, 16 Feb 2017 20:01:01 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v1GK0wDN024634; Thu, 16 Feb 2017 15:01:00 -0500 Subject: Re: [PATCH 1/8] Rename read_unsigned_leb128 to gdb_read_unsigned_leb128 To: Jan Kratochvil References: <148693097396.9024.2288256732840761882.stgit@host1.jankratochvil.net> <463df715-da64-57a4-3237-99826918def1@redhat.com> <20170216194026.GA30138@host1.jankratochvil.net> Cc: gdb-patches@sourceware.org, Victor Leschuk From: Pedro Alves Message-ID: <50c2f5aa-dedf-5c32-438f-1f9023795ec0@redhat.com> Date: Thu, 16 Feb 2017 20:01:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20170216194026.GA30138@host1.jankratochvil.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-02/txt/msg00450.txt.bz2 On 02/16/2017 07:40 PM, Jan Kratochvil wrote: > On Thu, 16 Feb 2017 16:23:51 +0100, Pedro Alves wrote: >> Can't we just use bfd's version? > > bfd's version is in libbfd.c: > /* Assorted BFD support routines, only used internally. > and libbfd.h: > /* libbfd.h -- Declarations used by bfd library *implementation*. > (This include file is not for users of the library.) > > And I think GDB is a user of libbfd library. > > (One could argue libbfd should use visibility and/or C++ namespaces but for > historical reasons libbfd does not use either.) > > I do not mind any solution, I have just complied with the libbfd policy. > Bah, there are copies of leb128 reading code all over the toolchain. binutils/ has read_leb128, gold/ has read_unsigned_LEB_128, gcc has a copy or two as well. And then the bfd version (and gdb's version, which seems to have been copied from bfd's) needs a bfd pointer, but it's not really necessary. Cleaning this all up quickly falls out of scope, so... Patch is OK. -- Pedro Alves