From: Stan Shebs <stanshebs@earthlink.net>
To: gdb-patches@sourceware.org
Subject: Re: FYI: minsyms documentation
Date: Thu, 22 Dec 2011 20:13:00 -0000 [thread overview]
Message-ID: <4EF38DAD.3040106@earthlink.net> (raw)
In-Reply-To: <m3vcp972sf.fsf@fleche.redhat.com>
On 12/21/11 6:34 PM, Tom Tromey wrote:
> I am checking this in on the trunk.
>
> Today I decided to try to document the minsyms API more or less the way
> I would like APIs to be documented in general. This patch implements
> that; it move documentation from function definitions to minsyms.h, adds
> an introductory comment about minsyms there as well, and it rearranges
> the header into a more logical order.
I'm not liking this idea very much I'm afraid.
First, as you point out later, GDB is not really a library. So internal
APIs tend to be pretty fluid, depending on the needs of the moment. But
if you mandate that the documentation be in different places depending
on function visibility, then the addition or removal of a static keyword
must be accompanied by a move of the header comment block. Even if one
did nothing more than split an overly-large file (and I note we now have
five source files > 10Kloc, long overdue for breakup), then there would
have to be massive movement of comment blocks, even if none of the
functions actually changed. Plus we already have many functions
declared in headers that really are intended to be private, and are only
public because of C's limitations; we don't really want to document
those as if they are stable API.
Second, this is potentially a very large change to the sources, but if
it's incremental, then we get into a confusing situation where some
files are changed, others are not, and some headers are half-changed
because they service multiple source files. I've been digging through
the bowels of MI code lately, and am reminded of how many of Andrew's
initiatives were never completed, generating all kinds of uncertainty
about whether to try to finish them, or roll back, or what. For things
that are major stylistic changes, we should at least think about whether
we can do some kind of automated transformation that brings all the code
into a new consistent state.
> My view is that gdbint.texinfo should eventually hold a high-level
> overview of the different modules in GDB, but that each individual
> module should be documented in the relevant header files. My reason for
> this is just that it is simpler to update documentation when it is in
> the form of comments. I think gdbint.texinfo should also hold
> documentation on our procedures, coding styles, and other things that
> are not directly related to some piece of code.
Isn't that generally our working assumption now?
> In the past people have mentioned using something like Doxygen to
> extract an actual document from the sources. I am not opposed to this,
> but I think that, as GDB is a program and not a library, such
> documentation is of limited value; and in any case there are known
> licensing issues with any such scheme -- see the archives of the GCC
> lists for details.
I agree, Doxygen is not very plausible. It could even be misleading, as
Doxygen output tends to make functions look more self-contained and
well-defined than would actually be the case for most of GDB.
Stan
next prev parent reply other threads:[~2011-12-22 20:06 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-22 4:44 Tom Tromey
2011-12-22 5:17 ` Joel Brobecker
2011-12-22 20:13 ` Stan Shebs [this message]
2011-12-22 20:21 ` Tom Tromey
2011-12-22 21:06 ` Eli Zaretskii
2011-12-23 4:21 ` Stan Shebs
2011-12-23 16:01 ` Eli Zaretskii
2012-01-02 22:08 ` Tom Tromey
2012-01-03 8:17 ` Eli Zaretskii
2011-12-24 7:45 ` Yao Qi
2011-12-24 13:21 ` Eli Zaretskii
2012-01-02 22:08 ` Tom Tromey
2012-01-03 8:18 ` Eli Zaretskii
2011-12-22 21:18 ` Stan Shebs
2011-12-23 10:38 ` Joel Brobecker
2012-01-02 22:14 ` Tom Tromey
2012-01-03 2:53 ` Joel Brobecker
2012-01-03 11:05 ` Pedro Alves
2012-01-03 13:21 ` commands.h and cli/cli-decode.h dups (was: Re: FYI: minsyms documentation) Pedro Alves
2012-01-03 14:57 ` commands.h and cli/cli-decode.h dups Tom Tromey
2012-01-03 17:11 ` Joel Brobecker
2012-01-05 11:40 ` Pedro Alves
2012-01-03 11:18 ` FYI: minsyms documentation Pedro Alves
2012-01-15 18:49 ` Michael Eager
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=4EF38DAD.3040106@earthlink.net \
--to=stanshebs@earthlink.net \
--cc=gdb-patches@sourceware.org \
/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