From: Andrew Cagney <cagney@gnu.org>
To: Dave Korn <dk@artimi.com>,
"'Joel Brobecker'" <brobecker@gnat.com>,
"'Eli Zaretskii'" <eliz@gnu.org>
Cc: gdb@sources.redhat.com
Subject: Re: Discussion: Formalizing the deprecation process in GDB
Date: Thu, 07 Oct 2004 16:14:00 -0000 [thread overview]
Message-ID: <416562C9.90801@gnu.org> (raw)
In-Reply-To: <NUTMEGfCrbreLDwdbWK000002ed@NUTMEG.CAM.ARTIMI.COM>
> Ok, I also read the code, but I very much appreciate having good
> documentation in book format. If you've got a serious chunk of architecture
> to learn about, it's a lot easier if it's all in one file that you can print
> out and browse through at your leisure rather than a page here and a page
> there scattered across many files.
(An architecture document is no more than 2 A4 pages, and one diagram -
that is extreemly highlevel but gets across the concepts.)
> FWIW I reckon gcc is getting it very right these days. There's a
> heavyweight internals manual that explains the architecture and big picture
> issues. Each file that implements a substantial module of functionality
> then also has documentation about its internals and implementation at the
> top of the file. Usually you only need the internals manual, and only if
> you find yourself rummaging around in the depths of alias analysis or
> something chasing a bug do you find yourself needing the per-file-internal
> documentation.
Yes, it's useful to understand why this is.
GCC has a simple pipeline architecture <frontend>-<middleend>-<backend>.
It's details can be described at two levels: the interfaces between
each "end" (ssa / rtl?); and the internals of a specific "end" (this
implements algorithm X).
GDB doesn't have that luxury. It's internals model the state of a
running program using objects and their interactions. In such a system
it is the complex relationships between the objects that is important,
and not the details of a specific bit of code.
For GCC typically a new "end" (or pass) can simply be plugged in, or an
existing "end" rewritten.
For GDB, fixing the hard problems involves making changes to those
complex object relationships and such requires significant and regular
refactoring.
A system that is being continuously re-factored is not well suited for
detailed internals documentation - the effort is wasted. Instead the
high level architecture and medium level object models that are important.
> Since opinions are being invited, I'll just mention that I'm currently
> working on an internal version of gdb for which I'm having to up-port a
> 5.x-compatible backend to 6.x series. I sometimes find it *ever* so hard
> when faced with yet another deprecated__ this or obsoleted_ that to know
> what the new and approved replacement is, and it often takes a combination
> of the internals manual, the in-source documentation and comments, and much
> searching of the list archive for the actual patch that made the deprecation
> to see how it was done at the time and understand the background and
> reasoning to it. I understand the reasons for using this technique and
> agree that it's sound engineering practice and necessary for the onward
> development of gdb, but I would like an easier solution to the general
> problem of knowing what to replace something with, and one that could be
> used off-line or on those occasions when sourceware goes down and you can't
> get at the list archive!
For multi-arch I wrote a migration document. This time I did not.
There is no "migration" path. The correct approach is:
- delete all deprecated code
- build
- run testsuite
- add a missing architecture vector method
- repeat
Instead of migrating, trying to reproduce each refactoring step, you
should leap frog.
A running joke between several of the GDB developers at the last GCC
summit was that we should present a 1hr paper titled "porting GDB to a
new architecture". Only instead of presenting slides, we'd just write
the code.
Andrew
next prev parent reply other threads:[~2004-10-07 15:38 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-27 17:55 Joel Brobecker
2004-09-27 20:35 ` Eli Zaretskii
2004-10-06 6:14 ` Andrew Cagney
2004-10-06 13:39 ` Eli Zaretskii
2004-10-07 4:48 ` Joel Brobecker
2004-10-07 14:27 ` Dave Korn
2004-10-07 15:12 ` Joel Brobecker
2004-10-07 16:16 ` Andrew Cagney
2004-10-07 18:50 ` Dave Korn
2004-10-07 16:14 ` Andrew Cagney [this message]
2004-10-07 18:08 ` Dave Korn
2004-10-07 19:18 ` Joel Brobecker
2004-10-07 19:28 ` Dave Korn
2004-10-08 7:08 ` Joel Brobecker
2004-10-08 12:13 ` Eli Zaretskii
2004-10-08 12:05 ` Eli Zaretskii
2004-10-08 8:54 ` Fabian Cenedese
2004-10-08 11:45 ` Eli Zaretskii
2004-10-08 19:22 ` Andrew Cagney
2004-10-10 21:31 ` Eli Zaretskii
2004-10-08 10:45 ` Eli Zaretskii
2004-10-08 13:31 ` Dave Korn
2004-10-08 13:38 ` Eli Zaretskii
2004-10-08 13:43 ` Dave Korn
2004-10-08 13:44 ` Dave Korn
2004-10-08 19:16 ` Eli Zaretskii
2004-10-08 19:45 ` Eli Zaretskii
2004-10-08 22:10 ` Andrew Cagney
2004-10-08 10:38 ` Eli Zaretskii
2004-10-11 15:11 ` Andrew Cagney
2004-10-12 7:34 ` Eli Zaretskii
2004-10-12 13:42 ` Mark Kettenis
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=416562C9.90801@gnu.org \
--to=cagney@gnu.org \
--cc=brobecker@gnat.com \
--cc=dk@artimi.com \
--cc=eliz@gnu.org \
--cc=gdb@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