Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <kettenis@chello.nl>
To: kewarken@qnx.com
Cc: drow@mvista.com, gdb-patches@sources.redhat.com
Subject: Re: [ping] Re: [Patch] arch recognition fix for osabi.c
Date: Fri, 11 Jul 2003 16:27:00 -0000	[thread overview]
Message-ID: <200307111626.h6BGQi3W033834@elgar.kettenis.dyndns.org> (raw)
In-Reply-To: <113c01c347bd$ba454a00$0202040a@catdog> (kewarken@qnx.com)

   From: "Kris Warkentin" <kewarken@qnx.com>
   Date: Fri, 11 Jul 2003 11:04:29 -0400

   Mark, Daniel had suggested that you were the end of the line as far as
   approving this change.

   Thread starts here:
   http://sources.redhat.com/ml/gdb-patches/2003-06/msg00562.html

Hmm, I folloed that thread, and I have some things to say about it.  I
just never did :-(.

The code is deliberately written the way it is.  The idea is that for
each CPU architecture we have a number of processors.  Some of these
are compatible with each other.  Others aren't.  The trick is to find
the ISA that is most compatible.  Most processor families out there
are backwards compatible, which basically means that a new processor
is based on ISA of its predecessor and adds some functionality to
that.  For processor families that work like that,
bfd_default_compatible does the right thing, and the code in
gdbarch_init_osabi selects an OSABI/ISA that's a subset of the desired
ISA.

Apparently this doesn't work for MIPS, since BFD declares different
processors (which it calls "machines") to be incompatible.  I'm not
quite familiar with MIPS, but I suppose this is not quite true, but
that the various MIPS processors cannot be mapped on a one-dimensional
quantity that expresses the features of the various CPU's.  That could
be a valid reason why the MIPS "compatibility function" is written the
way it is.  Perhaps it can be improved?  If so, I think that's the way
to go.  Otherwise, I think you should register for all CPU types that
you support.

One could argue that if one registers a handler for the "default
machine" that this should apply for all machines within an
architecture, but that breaks down for architectures that support both
32-bit and 64-bit machines.

Mark


  reply	other threads:[~2003-07-11 16:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-17 15:40 Kris Warkentin
2003-06-17 15:51 ` Daniel Jacobowitz
2003-06-17 16:04   ` Kris Warkentin
2003-06-19 12:25     ` Kris Warkentin
2003-06-19 13:18       ` Daniel Jacobowitz
2003-06-19 14:48         ` Kris Warkentin
2003-06-19 19:09     ` Daniel Jacobowitz
2003-06-19 22:10       ` Kevin Buettner
2003-07-11 15:04       ` [ping] " Kris Warkentin
2003-07-11 16:27         ` Mark Kettenis [this message]
2003-07-11 16:32           ` Daniel Jacobowitz
2003-07-18 14:13           ` Andrew Cagney
2003-07-18 14:19             ` Daniel Jacobowitz

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=200307111626.h6BGQi3W033834@elgar.kettenis.dyndns.org \
    --to=kettenis@chello.nl \
    --cc=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=kewarken@qnx.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