From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 904 invoked by alias); 24 Feb 2011 23:01:11 -0000 Received: (qmail 893 invoked by uid 22791); 24 Feb 2011 23:01:09 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.fgznet.ch (HELO smtp.fgznet.ch) (81.92.96.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 24 Feb 2011 23:01:03 +0000 Received: from deuterium.andreas.nets (dhclient-91-190-8-131.flashcable.ch [91.190.8.131]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id p1ON0xo3005502; Fri, 25 Feb 2011 00:01:00 +0100 (CET) (envelope-from andreast-list@fgznet.ch) Message-ID: <4D66E32B.4050405@fgznet.ch> Date: Thu, 24 Feb 2011 23:51:00 -0000 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: Mark Kettenis CC: gdb-patches@sourceware.org Subject: Re: [patch] testsuite gdb.base/jit-main.c References: <4D66CD47.7010206@fgznet.ch> <201102242148.p1OLmef5005138@glazunov.sibelius.xs4all.nl> In-Reply-To: <201102242148.p1OLmef5005138@glazunov.sibelius.xs4all.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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/msg00740.txt.bz2 Hi Mark, On 24.02.11 22:48, Mark Kettenis wrote: >> 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. Thanks for the feedback. Would it help to include exec_elf.h on obsd? Andreas >> --------------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-- >> > >