From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16433 invoked by alias); 5 Aug 2009 13:51:46 -0000 Received: (qmail 16425 invoked by uid 22791); 5 Aug 2009 13:51:45 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtagate8.de.ibm.com (HELO mtagate8.de.ibm.com) (195.212.29.157) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 05 Aug 2009 13:51:36 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate8.de.ibm.com (8.14.3/8.13.8) with ESMTP id n75DoVZg557478 for ; Wed, 5 Aug 2009 13:50:31 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id n75DoVuv2699496 for ; Wed, 5 Aug 2009 15:50:31 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n75DoVfA005837 for ; Wed, 5 Aug 2009 15:50:31 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id n75DoUex005822; Wed, 5 Aug 2009 15:50:30 +0200 Message-Id: <200908051350.n75DoUex005822@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Wed, 05 Aug 2009 15:50:29 +0200 Subject: Re: RFA: fix warning building spu-tdep.c To: tromey@redhat.com Date: Wed, 05 Aug 2009 13:51:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: from "Tom Tromey" at Aug 04, 2009 08:51:25 AM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: 2009-08/txt/msg00073.txt.bz2 Tom Tromey wrote: > The problem is that CORE_ADDR is 4 bytes here, but LONGEST is 8. Huh. I'm assuming this happens when using --enable-targets=all on a 32-bit host with a 32-bit primary target, right? If "spu" is the primary target, or is explicitly mentioned as secondary target, CORE_ADDR should be automatically chosen as an 8-byte type ... > The fix is to change SPUADDR_SPU to cast its result to CORE_ADDR. This > seems to be what is expected -- but, some places use int while others > use CORE_ADDR, so I did not want to commit this without review from > someone who knows the intent of this macro. The SPU ID is really an "int" (it's basically a file descriptor). There is indeed one place (spu_overlay_update_osect) that stores it into a variable of type CORE_ADDR, but that's an oversight that should be fixed. > 2009-08-04 Tom Tromey > > * spu-tdep.h (SPUADDR_SPU): Cast result to CORE_ADDR. If you change this to cast to "int" instead, this would be OK with me. However, even so support for Cell/B.E. combined debugging will still fail if CORE_ADDR is a 4-byte type, because the encoding of a pair of SPU ID and address into a single CORE_ADDR value will fail -- this set of macros fundamentally assumed a CORE_ADDR that is (at least) 64 bits wide ... I'll have a look at how this can be fixed. Probably we need to enable support only with --enable-64-bit-bfd. Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com