From: Daniel Jacobowitz <drow@mvista.com>
To: Andrew Cagney <cagney@gnu.org>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch/rfc,rfa:ppc64] Add osabi wildcard support
Date: Fri, 24 Oct 2003 14:55:00 -0000 [thread overview]
Message-ID: <20031024145515.GA25732@nevyn.them.org> (raw)
In-Reply-To: <3F9937AF.4010201@gnu.org>
On Fri, Oct 24, 2003 at 10:31:11AM -0400, Andrew Cagney wrote:
> >and the second is to explicitly register both of these architecture
> >variants vis:
> >
> > gdbarch_register_osabi (bfd_arch_powerpc, bfd_mach_ppc, ...
> > gdbarch_register_osabi (bfd_arch_powerpc, bfd_mach_ppc64, ...
>
> plus, I believe, either
> + gdbarch_register_osabi (bfd_arch_rs6000, bfd_mach_rs6k);
> or:
> + gdbarch_register_osabi (bfd_arch_powerpc, bfd_mach_rs6k);
>
> Per this post:
> http://sources.redhat.com/ml/binutils/2003-10/msg00543.html
> rs6000:6000 isn't considered compatible with the generic PPC, and hence
> the OSABI code couldn't find a match. That lead to the warning.
Excuse the rambling. I always have to type this out to figure out
which way it goes.
From bfd/cpu-powerpc.c, I see:
case bfd_arch_rs6000:
if (a->mach == bfd_mach_ppc)
return a;
Let's take:
ppc = {bfd_arch_powerpc, bfd_mach_ppc};
ppcrs6k = {bfd_arch_powerpc, bfd_mach_rs6k};
rs6k = {bfd_arch_rs6000, bfd_mach_rs6k};
We call default_arch->compatible (default_arch, handler_arch). That's
"can the default architecture run code for the architecture being
handled".
We call rs6k->compatible(rs6k, ppc). That's "an rs6k can run code
written for a generic powerpc", which returns false. The only true one
is rs6k->compatible(rs6k, rs6k) or rs6k->compatible(rs6k, ppcrs6k): an
rs6k can not run generic ppc code but it can run ppc/rs6k code. So
your suggestion seems right.
Confusingly, a generic ppc can run code for any rs6k according to the
compatible function. That threw me a loop.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2003-10-24 14:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-23 23:25 Andrew Cagney
2003-10-23 23:41 ` Daniel Jacobowitz
2003-10-24 0:38 ` Andrew Cagney
2003-10-24 0:52 ` Daniel Jacobowitz
2003-10-24 14:47 ` Andrew Cagney
2003-10-24 14:31 ` Andrew Cagney
2003-10-24 14:55 ` Daniel Jacobowitz [this message]
2003-10-28 21:59 ` Kevin Buettner
2003-10-28 23:56 ` Andrew Cagney
2003-10-29 3:33 ` Kevin Buettner
2003-10-29 19:30 ` Andrew Cagney
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=20031024145515.GA25732@nevyn.them.org \
--to=drow@mvista.com \
--cc=cagney@gnu.org \
--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