From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9874 invoked by alias); 1 Feb 2010 07:32:00 -0000 Received: (qmail 9866 invoked by uid 22791); 1 Feb 2010 07:32:00 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 01 Feb 2010 07:31:54 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 3DF312BAB6E; Mon, 1 Feb 2010 02:31:53 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id WU8ywXdZiUqk; Mon, 1 Feb 2010 02:31:53 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 90C732BAB5F; Mon, 1 Feb 2010 02:31:52 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 00127F59A0; Mon, 1 Feb 2010 11:31:25 +0400 (RET) Date: Mon, 01 Feb 2010 07:32:00 -0000 From: Joel Brobecker To: Masaki Muranaka Cc: gdb-patches@sourceware.org, fche@redhat.com Subject: Re: [patch] failed to build sim/ppc on OSX. Message-ID: <20100201073125.GO26827@adacore.com> References: <5D76F873-1960-49BC-AF83-321D4F099424@monami-software.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5D76F873-1960-49BC-AF83-321D4F099424@monami-software.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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/msg00005.txt.bz2 > sim/ppc/ChangeLog > 2010-01-31 Masaki Muranaka > > * interrupts.c (alignement_interrupt): Add type cast. 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... > - cpu_error(processor, cia, "alignment interrupt - ra=0x%lx", ra); > + cpu_error(processor, cia, "alignment interrupt - ra=0x%lx", (unsigned long)ra); 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? 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. 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). -- Joel