From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 80491 invoked by alias); 15 Aug 2016 16:57:51 -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 80479 invoked by uid 89); 15 Aug 2016 16:57:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=chances X-HELO: smtp.gentoo.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 15 Aug 2016 16:57:49 +0000 Received: from vapier.lan (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with SMTP id B4D0B340F82; Mon, 15 Aug 2016 16:57:47 +0000 (UTC) Date: Mon, 15 Aug 2016 16:57:00 -0000 From: Mike Frysinger To: Trevor Saunders Cc: Nick Clifton , gdb-patches@sourceware.org Subject: Re: [PATCH] sim: unify symbol table handling Message-ID: <20160815165746.GD30544@vapier.lan> Mail-Followup-To: Trevor Saunders , Nick Clifton , gdb-patches@sourceware.org References: <20160813195500.25598-1-vapier@gentoo.org> <9c6fd370-885a-4290-160c-e9898a87e051@redhat.com> <20160815142941.bs64o26znrff7t4u@ball> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Thv7PGoFpDPJ7Oar" Content-Disposition: inline In-Reply-To: <20160815142941.bs64o26znrff7t4u@ball> X-IsSubscribed: yes X-SW-Source: 2016-08/txt/msg00163.txt.bz2 --Thv7PGoFpDPJ7Oar Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1375 On 15 Aug 2016 10:29, Trevor Saunders wrote: > On Mon, Aug 15, 2016 at 10:22:04AM +0100, Nick Clifton wrote: > > Hi Mike, > >=20 > > > Nick: can you double check the aarch64 & msp430 changes ? > > > And see if in general this makes sense to you ? > >=20 > > Sure. > >=20 > > > 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. */ > > >=20=20 > > > -static unsigned long > > > -remove_useless_symbols (asymbol **symbols, unsigned long count) > > > +static long > > > +remove_useless_symbols (asymbol **symbols, long count) > >=20 > > 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* >=20 > or can we convert sim to C++ and use maybe ? ;) wouldn't really help when the underlying bfd lib uses long everywhere. that said, while conceptually it makes sense, the chances of working with an ELF that has more than 2^31 symbols seems extremely unlikely. -mike --Thv7PGoFpDPJ7Oar Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXsfSKAAoJEEFjO5/oN/WBb78P/jreQCZCEA/yVtpbpZ5fnZB3 JTNy5BbvGmSxANmBzpzuhtgRSIGCuDiX47MDlmbz5d8S3DLz30SX63m/+kYSYxZv g2AYDtD/4rV1gn5V1gi5ymqMUkBiS3CUruwxkEupuBKWWi6ybvfAdJlklM0hRiEc hVGiOzTATVBTXAKyAWIHASflWRltaKy98d5AWmaSrXC2Lh279Mv7LuwHPi+L9ve0 neYLYinCPizpBmDBNr8o/KzFvP0BxhFFgWQndccJcPKoapX4XxbXhJw7rkVVljRa Us3hk8SyQjx748yrhFzFL0ZNxQk/X6TqdaZHZws5TxaDSWLoUr9gAnh4AFlq1tyA iJExxAax1r74HE2QdI6vzYhTiOI3kaqmoPB2DZZtBkw1HlhdQNIIdBv34PHa+Zd7 /3wRBoQRmBTWBNXNeWAIj3XKjgdElYdZiVh0NDEXHMnCSxwMoj2VGFslQIrL+xvJ vmxEilVmTV5gZtSV1sU21V6JQRtqP1oD9FOV4AeTyjmEH/4N+nwwMMfZP/Sbaf9s kc+rUvajqyutmpWw5X265HERpOGoeCxBCqxt0R+Co4SXA85bT9QjmHVJE/F2IWQc PL1Cgc91TT0Lf+iW3xfirk2OtNytpPjt/TFv1EBc/d3IQecxxVN9ZyWMfln5ldOJ 7RQivbtkKdY7CH75KXKl =GrcT -----END PGP SIGNATURE----- --Thv7PGoFpDPJ7Oar--