From: Joel Brobecker <brobecker@adacore.com>
To: Aleksandar Ristovski <aristovski@qnx.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch] use .gnu.attributes to detect e500 machine type
Date: Tue, 28 Apr 2009 21:31:00 -0000 [thread overview]
Message-ID: <20090428213118.GH31821@adacore.com> (raw)
In-Reply-To: <gridf7$uu0$1@ger.gmane.org>
Hello Aleksandar,
I wish someone more familiar with the PPC architecture had some time
to review your patch. In the meantime, I'll trust your knowledge of
the PPC; but it's nice to see that the current code seems to confirm
what you said :)
> It also introduces a function for "show powerpc vector-abi" to print both
> ABI being used and if different, global setting (output can be seen
> below). This could be a separate patch - let me know if you want it
> separately.
I think it would make sense to separate this part, especially since
I don't understand what you're trying to do, yet. Perhaps we'll need
to start doing something like what we do for "set/show lang ...",
but we can discuss this relatively minor part separately.
> * rs6000-tdep.c (rs6000_gdbarch_init): Use .gnu.attributes to see
> if this is a e500 binary (with SPE APU).
> (powerpc_show_vector_abi): New function.
If you look at today's version of rs6000_gdbarch_init, you'll find
that we're already checking the Tag_GNU_Power_ABI_Vector, and setting
the tdep->vector_abi accordingly. It's actually conditionalized on
HAVE_ELF, so we need at least to make sure that your testing of
the .gnu.attributes sections gets conditionalized on HAVE_ELF as well.
However, I am wondering if it wouldn't be better to simply take
advantage of the code that's already there. For that, you'll need
to move the code up a bit, so that vector_abi gets set earlier.
You can then use the resulting information to determine whether or
not to fallback on the current approach of using .PPC.EMB.apuinfo.
What do you think?
--
Joel
next prev parent reply other threads:[~2009-04-28 21:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-08 14:48 Aleksandar Ristovski
2009-04-14 19:48 ` Aleksandar Ristovski
2009-04-28 21:31 ` Joel Brobecker [this message]
2009-05-22 19:21 ` Aleksandar Ristovski
2009-07-06 16:34 ` Aleksandar Ristovski
2009-07-06 17:48 ` Daniel Jacobowitz
2009-07-06 21:26 ` Aleksandar Ristovski
2009-07-21 15:41 ` Aleksandar Ristovski
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=20090428213118.GH31821@adacore.com \
--to=brobecker@adacore.com \
--cc=aristovski@qnx.com \
--cc=gdb-patches@sources.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