Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Stan Shebs <shebs@cygnus.com>
To: jimb@cygnus.com
Cc: jtc@redbacknetworks.com, cagney@cygnus.com, gdb@cygnus.com
Subject: Re: breakpoint extension for remote protocol
Date: Thu, 01 Apr 1999 00:00:00 -0000	[thread overview]
Message-ID: <199902162128.NAA25807@andros.cygnus.com> (raw)
In-Reply-To: <npg186fajx.fsf@zwingli.cygnus.com>

   From: Jim Blandy <jimb@cygnus.com>
   Date: 16 Feb 1999 13:49:54 -0500

   For the record, Zdenek Radouch pointed out a while back on the
   internal GDB mailing list a distinction that I liked:

   There are actually three "architectures" that we care about:
     - the architecture of the processor itself
     - the ABI and calling conventions (controlled by the compiler/linker
       environment)
     - the target board architecture (excluding the CPU)

Yes, this is a good mental model.

   At present, we kind of smoosh them all together, which causes
   confusion when someone else needs to wade into our code and
   disentangle our assumptions.  We support multiple ABI's for the MIPS
   and PPC (at least), and (I think???) you have to select the one you
   want at configuration time (--target=powerpc-eabi, for example).  So
   we are already drifting away from "generic" embedded toolchains, which
   I agree is bad.

This is a leftover from native debugging, where the configure-time
choice of host OS determines architecture and ABI.  In fact, even
CPU variants are often reduced down to a single "programmer's model"
that restricts access to some of a chip's features (like supervisor
mode :-) ).

   When we estimate new GDB ports, we should include time to actually
   segregate those three things nicely, so that GDB could have a "set
   abi" and "set board" command.  Otherwise, if GDB is really to know all
   that stuff (as Stan has said it should), it's going to be a total mess.

In general, GDB should not have to know much about specific boards;
things are simplified overall if the board support package takes care
of board idiosyncrasies, so for instance GDB can say "write memory"
and the board does one thing for flash, and something else for RAM.

ABI is clearly a weak point, and in the mercifully few cases of chips
with multiple ABIs, we do need to make the choice dynamically rather
than statically, preferably automatically by studying the code, but
with a manual "set abi" command to handle failures of automation.

Unlike with GCC, there is little or no advantage to compiling GDB's
target knowledge in at build time.  So we should be moving towards
making it more dynamic overall.

							Stan


  reply	other threads:[~1999-04-01  0:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <199812041858.KAA25185.cygnus.gdb@jtc.redbacknetworks.com>
1998-12-10 19:27 ` Andrew Cagney
1998-12-10 21:46   ` Stu Grossman
1998-12-11 11:59     ` J.T. Conklin
1998-12-11 14:30       ` J.T. Conklin
1998-12-11 11:24   ` J.T. Conklin
     [not found]   ` <13936.45476.191551.329690.cygnus.gdb@babylon-5.cygnus.com>
1999-04-01  0:00     ` Andrew Cagney
1999-04-01  0:00       ` J.T. Conklin
1999-04-01  0:00         ` Stan Shebs
1999-04-01  0:00           ` Jim Blandy
1999-04-01  0:00             ` Stan Shebs [this message]
1999-04-01  0:00               ` J.T. Conklin
1999-04-01  0:00               ` GDB: one version for all targets Brendan Simon
1999-04-01  0:00                 ` Stan Shebs
     [not found] <199901050119.RAA19672.cygnus.gdb@jtc.redbacknetworks.com>
1999-04-01  0:00 ` breakpoint extension for remote protocol Andrew Cagney
1998-12-04 10:59 J.T. Conklin
1998-12-23 13:07 ` Greg McGary

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=199902162128.NAA25807@andros.cygnus.com \
    --to=shebs@cygnus.com \
    --cc=cagney@cygnus.com \
    --cc=gdb@cygnus.com \
    --cc=jimb@cygnus.com \
    --cc=jtc@redbacknetworks.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