Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: John Gilmore <gnu@toad.com>
To: Stan Shebs <stanshebs@earthlink.net>
Cc: gdb@sourceware.org
Subject: Re: A new strategy for internals documentation
Date: Sat, 10 Aug 2013 02:24:00 -0000	[thread overview]
Message-ID: <201308100224.r7A2OA6a008579@new.toad.com> (raw)
In-Reply-To: <52056DC4.4040109@earthlink.net>

> The ironic thing is that no one working on a new free software project
> today would react to that situation by saying "we need an internals
> manual".  The project would add a wiki page, send an email, or maybe a
> blog posting, or a long comment block in the source code.  

Or a README file in the source code.  But the info in gdbint is too
voluminous for that.  Or for an email or a blog posting or a long 
comment block.  Because it aggregates info from a lot of emails
and blog postings and comment blocks.

I mean, we could paste the info about symbol tables from gdbint into
symtab.h, as a long multipage comment block.  I doubt that that would
encourage people to update it any more than they do now.  Maybe more
people would notice it because they would find it in grep results,
since it'd be in the main source directory rather than in the doc
directory.

I was a long term volunteer for One Laptop Per Child.  OLPC used a
Wiki for its documentation.  You can see that the older stuff got well
documented, partly by staff and partly by volunteers like me.  It fell
rapidly out of date as soon as the staff shrunk and most volunteers
went on to other things.  You can see it today at
http://wiki.laptop.org .  It doesn't even mention the latest OLPC
hardware or software (the XO Tablet on sale at Walmart)!

And if you want the Wiki pages that match your OLPC hardware (they
had four different vintages), operating system release (they've gone
through about 13), etc, you are SOL -- you have to find them manually,
possibly digging through the revision history of particular pages.

And when wiki.laptop.org goes down, which it will one day, then
only the Internet Archive will have a copy -- if we're lucky.  At
least the GDB documentation is in the source code, so if GDB survives,
the doc also survives.

> If there were a half-dozen files to edit in sync, these days there
> is more likely to be intense pressure to refactor that code and
> bring it back down to one place to edit, which would then be the
> place for the documentation about it.

That's a lovely concept.  But I don't think even the amazing all-powerful
C++ has managed to eliminate the requirement to add things to both header
files and source files.  And if you change the classic way from:

  *  Add definitions for a new something to a struct or enum in category.h
  *  Add code to use that new something in category.c
  *  Add a new source module something.c that implements the something
  *  Add something.c to the Makefile

to:

  *  Add something.c to the directory, the Makefile builds and links in
     every .c automatically, initializers build a dynamic data
     structure that enumerates all things of this category, etc...

... then you have scattered the info about "things of this category"
into X number of files, rather than having a central place to ask,
"How many things fall into this category?  Which are they?"

The classic problem with object-oriented code like this is that the
information that would let you wrap your head around a concept (like a
"target" or an "architecture" or a "symtab") is scattered among dozens
of source files, and even merely instantiating one of them results in
code running in a dozen files that inherit from each other in obscure
ways.

	John


  parent reply	other threads:[~2013-08-10  2:24 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-06 22:26 Stan Shebs
2013-08-07  4:28 ` Eli Zaretskii
2013-08-07 19:58   ` Stan Shebs
2013-08-08 17:28     ` Eli Zaretskii
2013-08-08 21:08       ` Doug Evans
2013-08-08 21:56         ` Eli Zaretskii
2013-08-08 23:03           ` Stan Shebs
2013-08-09  8:08             ` John Gilmore
2013-08-09  9:53               ` Eli Zaretskii
2013-08-09  9:35             ` Eli Zaretskii
2013-08-09 23:04               ` Stan Shebs
2013-08-09  9:53             ` Mark Kettenis
2013-08-09 23:28               ` Stan Shebs
2013-08-08 23:04           ` Doug Evans
2013-08-09  9:13             ` Eli Zaretskii
2013-08-10  1:13             ` Yao Qi
2013-08-21 18:09     ` Steinar Bang
2013-08-21 20:02       ` Eli Zaretskii
2013-08-22 18:29         ` Steinar Bang
2013-08-08  3:45   ` Yao Qi
2013-08-08 17:31     ` Eli Zaretskii
2013-08-09  1:30       ` John Gilmore
2013-08-09  9:26         ` Eli Zaretskii
2013-08-09 18:16           ` Tom Tromey
2013-08-09 18:36             ` Eli Zaretskii
2013-08-09 22:31         ` Stan Shebs
2013-08-09 23:32           ` Matt Rice
2013-08-10  2:24           ` John Gilmore [this message]
2013-08-08 20:43   ` Tom Tromey
2013-08-08 20:57   ` Doug Evans
2013-08-08 20:41 ` Tom Tromey

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=201308100224.r7A2OA6a008579@new.toad.com \
    --to=gnu@toad.com \
    --cc=gdb@sourceware.org \
    --cc=stanshebs@earthlink.net \
    /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