From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: tromey@redhat.com
Cc: gdb-patches@sourceware.org
Subject: Re: RFA: fix warning building spu-tdep.c
Date: Wed, 05 Aug 2009 13:51:00 -0000 [thread overview]
Message-ID: <200908051350.n75DoUex005822@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <m3tz0nhbte.fsf@fleche.redhat.com> from "Tom Tromey" at Aug 04, 2009 08:51:25 AM
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 <tromey@redhat.com>
>
> * 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
next prev parent reply other threads:[~2009-08-05 13:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-04 14:51 Tom Tromey
2009-08-05 13:51 ` Ulrich Weigand [this message]
2009-08-05 15:08 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200908051350.n75DoUex005822@d12av02.megacenter.de.ibm.com \
--to=uweigand@de.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox