public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: Tom Tromey <tom@tromey.com>, binutils@sourceware.org
Subject: Re: [PATCH 7/8] Use @deftypefn in chew output
Date: Wed, 15 Feb 2023 12:55:31 -0500	[thread overview]
Message-ID: <eb490c55-747d-9064-c6f0-b36917aa0551@polymtl.ca> (raw)
In-Reply-To: <20230208071725.3668898-8-tom@tromey.com>

On 2/8/23 02:17, Tom Tromey wrote:
> When reading the BFD info manual, function definitions looked very
> strange to me:
> 
>     *Synopsis*
> 	 long bfd_get_mtime (bfd *abfd);
>        *Description*
>     Return the file modification time (as read from the file system, or from
>     the archive header for archive members).
> 
> The *Synopsis* and *Description* text in particular is very un-info-like.
> 
> To fix this, I tried removing the *Synopsis* text and having FUNCTION
> use @deftypefn instead.  However, this ended up requiring some new
> state, because SYNOPSIS can appear without FUNCTION.  This in turn
> required "catstrif" (I considered adding FORTH-style if-else-then, but
> in the end decided on an ad hoc approach).
> 
> After this the result looks like:
> 
>  -- Function: long bfd_get_mtime (bfd *abfd);
>      Return the file modification time (as read from the file system, or
>      from the archive header for archive members).
> 
> This patch also reorders a few documentation comments to ensure that
> SYNOPSIS comes before DESCRIPTION.  This is the more common style and
> is also now required by doc.str.
> 
> bfd/ChangeLog
> 2023-02-07  Tom Tromey  <tom@tromey.com>
> 
> 	* syms.c (bfd_decode_symclass, bfd_is_undefined_symclass)
> 	(bfd_symbol_info): Reorder documentation comment.
> 	* doc/doc.str (synopsis_seen): New variable.
> 	(SYNOPSIS): Set synopsis_seen.  Emit @deftypefn.
> 	(DESCRIPTION): Use synopsis_seen.
> 	* doc/chew.c (catstrif): New function.
> 	(main): Add catstrif intrinsic.
> 	(compile): Recognize "variable" command.

Hi Tom,

Starting with this commit, I see this when building (with ASan enabled):

  GEN      doc/aoutx.stamp

=================================================================
==45648==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 14 byte(s) in 1 object(s) allocated from:
    #0 0x7f193eebfa89 in __interceptor_malloc /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x55a292052ba0 in xmalloc /home/smarchi/src/binutils-gdb/bfd/doc/chew.c:158
    #2 0x55a29205678a in nextword /home/smarchi/src/binutils-gdb/bfd/doc/chew.c:1090
    #3 0x55a292057c1e in compile /home/smarchi/src/binutils-gdb/bfd/doc/chew.c:1331
    #4 0x55a292058b8b in main /home/smarchi/src/binutils-gdb/bfd/doc/chew.c:1511
    #5 0x7f193ec3c78f  (/usr/lib/libc.so.6+0x2378f)

Simon

  reply	other threads:[~2023-02-15 17:55 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-08  7:17 [PATCH 0/8] Make the BFD info manual a bit prettier Tom Tromey
2023-02-08  7:17 ` [PATCH 1/8] Remove H_CFLAGS from doc/local.mk Tom Tromey
2023-02-08  7:17 ` [PATCH 2/8] Simplify @node use in BFD documentation Tom Tromey
2023-03-03  8:20   ` Jan Beulich
2023-03-03 23:08     ` Tom Tromey
2023-03-06  7:07       ` Jan Beulich
2023-02-08  7:17 ` [PATCH 3/8] Add copyright headers to the .str files Tom Tromey
2023-02-08  7:17 ` [PATCH 4/8] Remove the paramstuff word Tom Tromey
2023-02-08  7:17 ` [PATCH 5/8] Use intptr_t rather than long in chew Tom Tromey
2023-02-08  7:17 ` [PATCH 6/8] Change internalmode to be an intrinsic variable Tom Tromey
2023-02-08  7:17 ` [PATCH 7/8] Use @deftypefn in chew output Tom Tromey
2023-02-15 17:55   ` Simon Marchi [this message]
2023-02-15 23:11     ` Tom Tromey
2023-02-16  1:29       ` Simon Marchi
2023-02-19  3:46         ` Alan Modra
2023-02-08  7:17 ` [PATCH 8/8] Remove RETURNS from BFD chew comments Tom Tromey
2023-02-15  9:54 ` [PATCH 0/8] Make the BFD info manual a bit prettier Nick Clifton
2023-02-15 21:51   ` Tom Tromey
2023-02-16  9:40     ` Nick Clifton

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=eb490c55-747d-9064-c6f0-b36917aa0551@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=binutils@sourceware.org \
    --cc=tom@tromey.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).