From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 91776 invoked by alias); 15 Aug 2016 14:21:58 -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 91764 invoked by uid 89); 15 Aug 2016 14:21:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: paperclip.tbsaunde.org Received: from tbsaunde.org (HELO paperclip.tbsaunde.org) (66.228.47.254) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 15 Aug 2016 14:21:57 +0000 Received: from ball (unknown [IPv6:2607:f0c8:8000:80e0:56ee:75ff:fe52:afb9]) by paperclip.tbsaunde.org (Postfix) with ESMTPSA id CC987C073; Mon, 15 Aug 2016 14:21:55 +0000 (UTC) Date: Mon, 15 Aug 2016 14:21:00 -0000 From: Trevor Saunders To: Nick Clifton Cc: Mike Frysinger , gdb-patches@sourceware.org Subject: Re: [PATCH] sim: unify symbol table handling Message-ID: <20160815142941.bs64o26znrff7t4u@ball> References: <20160813195500.25598-1-vapier@gentoo.org> <9c6fd370-885a-4290-160c-e9898a87e051@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9c6fd370-885a-4290-160c-e9898a87e051@redhat.com> User-Agent: Mutt/1.6.2-neo (2016-07-23) X-SW-Source: 2016-08/txt/msg00162.txt.bz2 On Mon, Aug 15, 2016 at 10:22:04AM +0100, Nick Clifton wrote: > Hi Mike, > > > Nick: can you double check the aarch64 & msp430 changes ? > > And see if in general this makes sense to you ? > > Sure. > > > diff --git a/sim/aarch64/interp.c b/sim/aarch64/interp.c > > [...] > > /* Filter out (in place) symbols that are useless for disassembly. > > COUNT is the number of elements in SYMBOLS. > > Return the number of useful symbols. */ > > > > -static unsigned long > > -remove_useless_symbols (asymbol **symbols, unsigned long count) > > +static long > > +remove_useless_symbols (asymbol **symbols, long count) > > I understand the change to a signed long, but personally I consider > it a mistake. The number of symbols is always going to be a positive > value, and the need for an error value could easily be handled using > -1U instead of -1L. But the problem is endemic to the BFD library's > symbol handling code, so I guess that it will have to stay. *sigh* or can we convert sim to C++ and use maybe ? ;) Trev