Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: jtc@redbacknetworks.com (J.T. Conklin)
To: Stan Shebs <shebs@cygnus.com>
Cc: jimb@cygnus.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: <5mww1iyn8n.fsf@jtc.redbacknetworks.com> (raw)
In-Reply-To: <199902162128.NAA25807@andros.cygnus.com>

>>>>> "shebs" == Stan Shebs <shebs@cygnus.com> writes:
jimb>  There are actually three "architectures" that we care about:
jimb>		- the architecture of the processor itself 
jimb>		- the ABI and calling conventions (controlled by the
jimb>		  compiler/linker environment)
jimb>		- the target board architecture (excluding the CPU)

I think the second point could be further subdivided.  For the most
part, GDB only cares about the calling conventions.  But in some
cases, for example with setjmp()/longjmp(), it wants to know the
internals of the implementation.  There is no guarentee that my
setjmp()/longjmp() implementation is going to store registers in
the same order as anyone elses.

I'm not quite sure what is meant by target board architecture,
hopefully whatever back end GDB uses (the remote protocol, a ROM
monitor, etc) abstracts and isolates it from the target board.

shebs> Yes, this is a good mental model.

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

I think it's not so much drifting away from "generic" toolchains.  The
infrastructure for generic toolchains wasn't/isn't in place, and it is
a lot of work to retrofit.  

It used to be much worse.  When I joined Cygnus, I believe there were
several m68k toolchains --- as GDB backend and newlib target support
for the various eval boards were separate configs.

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

And MMU and other system registers, etc.

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

And also so you have a complete product in the end.  For example,
there've been many new GDB ports done, but there haven't been many new
stubs.

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

Agreed, write protected RAM, EEPROM, flash, banked memory, etc. should
all be handled by the code in the stub that handles the 'write memory'
command.  Using a vendor-supplied ROM monitor might require additional
knowlege by GDB about the target and "helper" routines in the
application.  Bleh.  That's too ugly to think about.

	--jtc

-- 
J.T. Conklin
RedBack Networks


  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
1999-04-01  0:00               ` J.T. Conklin [this message]
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=5mww1iyn8n.fsf@jtc.redbacknetworks.com \
    --to=jtc@redbacknetworks.com \
    --cc=cagney@cygnus.com \
    --cc=gdb@cygnus.com \
    --cc=jimb@cygnus.com \
    --cc=shebs@cygnus.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