From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15440 invoked by alias); 1 Feb 2010 09:10:43 -0000 Received: (qmail 15430 invoked by uid 22791); 1 Feb 2010 09:10:42 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from p12018-ipbffx02marunouchi.tokyo.ocn.ne.jp (HELO mail.pizzafactory.jp) (222.147.75.18) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 01 Feb 2010 09:10:38 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.pizzafactory.jp (Postfix) with ESMTP id 1138A59912BD; Mon, 1 Feb 2010 18:10:48 +0900 (JST) Received: from mail.pizzafactory.jp ([127.0.0.1]) by localhost (ldap.monami-software.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LOWwtWA2W09J; Mon, 1 Feb 2010 18:10:47 +0900 (JST) Received: from [192.168.0.9] (unknown [192.168.0.9]) by mail.pizzafactory.jp (Postfix) with ESMTP id A4C6E59912B6; Mon, 1 Feb 2010 18:10:47 +0900 (JST) Subject: Re: [patch] failed to build sim/ppc on OSX. Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Masaki Muranaka In-Reply-To: <20100201073125.GO26827@adacore.com> Date: Mon, 01 Feb 2010 09:10:00 -0000 Cc: gdb-patches@sourceware.org, fche@redhat.com Content-Transfer-Encoding: quoted-printable Message-Id: <060F294C-3872-47D9-A8FC-558808649BA6@monami-software.com> References: <5D76F873-1960-49BC-AF83-321D4F099424@monami-software.com> <20100201073125.GO26827@adacore.com> To: Joel Brobecker 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: 2010-02/txt/msg00010.txt.bz2 Hello Joel and fche, Hmm. I'm thoughtless about this issue. It is caused by 32bit/64bit as you say.=20 There is similar type casts in sim/ppc/vm_n.h, so it's harmless to apply my patch. (And useful to fix build failure on OSX.) But I agree there should be applied the another better fix. Please reject that patch. I'll try to fix this issue again later. Thanks, On 2010/02/01, at 16:31, Joel Brobecker wrote: >> sim/ppc/ChangeLog >> 2010-01-31 Masaki Muranaka >>=20 >> * interrupts.c (alignement_interrupt): Add type cast. >=20 > I don't know the sim code well enough to review this change. However, > I can't help but wonder whether it might be incorrect or not. > I'm copying Frank who is not exactly responsible for the ppc sim, > but who is maintainer for the common part - perhaps he has some insight > he can share... >=20 >> - cpu_error(processor, cia, "alignment interrupt - ra=3D0x%lx", ra); >> + cpu_error(processor, cia, "alignment interrupt - ra=3D0x%lx", (unsi= gned long)ra); >=20 > ra is defined as "unsigned_word", which, depending on the > WITH_TARGET_WORD_BITSIZE can be either unsigned64 or unsigned32. > Isn't there a problem if the host long is 32bits while unsigned_word > is 64bit? >=20 > In GDB, we solve the same sort of issue (print target addresses stored > inside a host CORE_ADDR type) using a routine that does the printing. > I didn't search very hard, but at first sight, there does not appear > to be a similar routine. >=20 > Not sure what the best solution might be... I'd probably be lazy and > upcast to unsigned long long to make sure that ra is casted to 64bits > (assuming that this is even true at all in practice). >=20 > --=20 > Joel >=20