From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14586 invoked by alias); 24 Feb 2011 21:49:01 -0000 Received: (qmail 14578 invoked by uid 22791); 24 Feb 2011 21:49:01 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 24 Feb 2011 21:48:56 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id p1OLmgJv013855; Thu, 24 Feb 2011 22:48:42 +0100 (CET) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id p1OLmef5005138; Thu, 24 Feb 2011 22:48:40 +0100 (CET) Date: Thu, 24 Feb 2011 23:01:00 -0000 Message-Id: <201102242148.p1OLmef5005138@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: andreast-list@fgznet.ch CC: gdb-patches@sourceware.org In-reply-to: <4D66CD47.7010206@fgznet.ch> (message from Andreas Tobler on Thu, 24 Feb 2011 22:27:35 +0100) Subject: Re: [patch] testsuite gdb.base/jit-main.c References: <4D66CD47.7010206@fgznet.ch> 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: 2011-02/txt/msg00739.txt.bz2 > Date: Thu, 24 Feb 2011 22:27:35 +0100 > From: Andreas Tobler > > Hi all, > > on non Linux platforms (FreeBSD for example) this test case fails due to > ElfW being not defined. > > The below tries to achieve this shortcoming. > > Tested on FreeBSD x86_64/amd64 (64-bit), FreeBSD powerpc (32-bit) and > also on linux-ppc (32-bit). > > What do you think? Looks reasonable. This won't make the testcase work on OpenBSD (we don't have ), but it does bring things a step closer. But this will probably make Solaris happier as well. > --------------040302050407010400080508 > Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0"; > name="jit-main.diff" > Content-Transfer-Encoding: 7bit > Content-Disposition: attachment; > filename="jit-main.diff" > > Index: jit-main.c > =================================================================== > RCS file: /cvs/src/src/gdb/testsuite/gdb.base/jit-main.c,v > retrieving revision 1.1 > diff -u -r1.1 jit-main.c > --- jit-main.c 31 Jan 2011 21:44:52 -0000 1.1 > +++ jit-main.c 24 Feb 2011 20:45:39 -0000 > @@ -29,6 +29,19 @@ > #include > #include > > +/* ElfW is coming from linux. On other platforms it does not exist. > + Let us define it here. */ > +#ifndef ElfW > +# if (defined (_LP64) || defined (__LP64__)) > +# define WORDSIZE 64 > +# else > +# define WORDSIZE 32 > +# endif /* _LP64 || __LP64__ */ > +#define ElfW(type) _ElfW (Elf, WORDSIZE, type) > +#define _ElfW(e,w,t) _ElfW_1 (e, w, _##t) > +#define _ElfW_1(e,w,t) e##w##t > +#endif /* !ElfW */ > + > typedef enum > { > JIT_NOACTION = 0, > > --------------040302050407010400080508-- >