From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: amodra@bigpond.net.au (Alan Modra)
Cc: gdb-patches@sourceware.org, binutils@sourceware.org
Subject: Re: spu-gdb vs. stabs
Date: Thu, 14 Dec 2006 17:34:00 -0000 [thread overview]
Message-ID: <200612141733.kBEHXt2f031201@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <20061214071839.GD6013@bubble.grove.modra.org> from "Alan Modra" at Dec 14, 2006 05:48:39 PM
Alan Modra wrote:
> There are a number of ways to fix this. One is to modify dbxread.c
> to accept a zero return from bfd_get_size. Another is to make the
> default iovec stat function return INT_MAX in st_size to effectively
> circumvent the dbxread.c checks. I chose to extend bfd_openr_iovec
> to accept a user "stat" function so that the actual size can be
> provided, but then cowardly decided to just return a size of INT_MAX
> in the spu implementation for stat. See the comment.
That sounds great, thanks!
> If the kernel
> /proc file used to find the address of a spu embedded binary also
> returned the size then we could easily provide a better stat
> function.
That's not so easy, the information gets lost during embedding
already. It would require ABI changes throughout the process ...
If we really need a proper size at some point, I think parsing
the ELF headers should suffice for that.
> gdb/
> * spu-linux-nat.c (spu_bfd_iovec_stat): New function.
> (spu_bfd_open): Adjust bfd_openr_iovec call.
This is OK, except ...
> +#ifdef INT_MAX
> + sb->st_size = INT_MAX;
> +#else
> + sb->st_size = ((unsigned) -1) >> 1;
> +#endif
... GDB's defs.h already has a fallback definition for INT_MAX,
so you can just use the macro unconditionally here.
Thanks,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
prev parent reply other threads:[~2006-12-14 17:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-14 7:18 Alan Modra
2006-12-14 17:34 ` Ulrich Weigand [this message]
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=200612141733.kBEHXt2f031201@d12av02.megacenter.de.ibm.com \
--to=uweigand@de.ibm.com \
--cc=amodra@bigpond.net.au \
--cc=binutils@sourceware.org \
--cc=gdb-patches@sourceware.org \
/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