From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 104139 invoked by alias); 24 Sep 2015 11:53:25 -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 104127 invoked by uid 89); 24 Sep 2015 11:53:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-HELO: usevmg20.ericsson.net Received: from usevmg20.ericsson.net (HELO usevmg20.ericsson.net) (198.24.6.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 24 Sep 2015 11:53:24 +0000 Received: from EUSAAHC001.ericsson.se (Unknown_Domain [147.117.188.75]) by usevmg20.ericsson.net (Symantec Mail Security) with SMTP id F2.4D.32596.EF483065; Thu, 24 Sep 2015 07:07:10 +0200 (CEST) Received: from [142.133.110.95] (147.117.188.8) by smtp-am.internal.ericsson.com (147.117.188.77) with Microsoft SMTP Server id 14.3.248.2; Thu, 24 Sep 2015 07:53:21 -0400 Subject: Re: [PATCH 2/7] Move some integer operations to common. To: Doug Evans References: <001a113448083110dd05207021ae@google.com> CC: Pedro Alves , Gary Benson , gdb-patches From: Antoine Tremblay Message-ID: <5603E431.9070703@ericsson.com> Date: Thu, 24 Sep 2015 11:53:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <001a113448083110dd05207021ae@google.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-09/txt/msg00558.txt.bz2 On 09/23/2015 04:40 PM, Doug Evans wrote: > > It would also introduce a bfd version dependency in common code to > check > > for this static header. And it could be quite an ugly #ifdef changing > > ints to enum in case the header is present. > > This is a non-issue. gdb always uses bfd HEAD, and in general > we don't support uses of bfd outside of binutils and gdb. Ok thanks, good to know. > > > One thing to consider too is that this patchset has now changed a bit > > and this enum is no longer used in GDBServer itself at all. > > I'm less interested in whether the enum is used in gdbserver than > whether it is used in the common code (and thus by extension > it still matters what gdbserver uses). > Humm I think this will become more clear when I post the updated pathset, I suggest we restart this point when I do that if needed. > We *could* just use a bool, is_big_endian or is_little_endian. > The code today assumes it never sees BFD_ENDIAN_UNKNOWN, > which would be nice to fix. > Or we could invent a new enum that just has big/little endian. Given that BFD_ENDIAN_UNKNOWN is used in a few places in GDB I would move to fix the functions where it's not taken into consideration and should be... but it can be part of another patch set.