public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@redhat.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/3] gdbserver: allow the --debug command line option to take a value
Date: Mon, 04 Dec 2023 15:57:14 +0000	[thread overview]
Message-ID: <87il5egdut.fsf@redhat.com> (raw)
In-Reply-To: <83h6l3avzv.fsf@gnu.org>

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Andrew Burgess <aburgess@redhat.com>
>> Cc: gdb-patches@sourceware.org
>> Date: Thu, 30 Nov 2023 18:31:24 +0000
>> 
>> Eli Zaretskii <eliz@gnu.org> writes:
>> 
>> >> +Each @var{option} is the name of a component for which debugging
>> >> +should be enabled.  The list of possible options is @option{all},
>> >> +@option{threads}, @option{event-loop}, @option{remote}.  The special
>> >> +option @option{all} enables all components.  The option list is
>> >> +processed left to right, and an option can be prefixed with the
>> >> +@kbd{-} character to disable output for that component, so you could write:
>> >> +
>> >> +@smallexample
>> >> +target> gdbserver --debug=all,-event-loop
>> >> +@end smallexample
>> >> +
>> >> +@noindent to turn on debug output for all components except @option{event-loop}.
>> >
>> > Why do we need this duplicate description?  I'd prefer to have a short
>> > sentence with a cross-reference to the previous description, so that
>> > we could have only one of them, not two.
>> 
>> This is unfortunate.  One of these instances is the general gdb info
>> manual, while the second of these is the gdbserver man page.
>
> The above is from the manual, and in Texinfo, not from the man page.
> How is the man page relevant?

The man page is generated from gdb.texinfo using this magic in
gdb/doc/Makefile.in:

  gdbserver.1: $(GDB_DOC_FILES)
  	touch $@
  	-$(TEXI2POD) $(MANCONF) -Dgdbserver < $(srcdir)/gdb.texinfo > gdbserver.pod
  	-($(POD2MAN1) gdbserver.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
  		mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
  	rm -f gdbserver.pod

If from a top-level binutils-gdb build directory you do:

  make -C gdb/doc man

you'll then be able to do:

 man gdb/doc/gdbserver.1

and in that man-page you'll find that one of the blocks of my change are
present.  Note that my patch doesn't touch any other files in gdb/doc,
so we can be sure this is all coming from gdb.texinfo.

Similarly, if you:

 make -C gdb/doc info

and then:

 info gdb/doc/gdb.info

and then search for "Man Pages", you'll see that the man-pages for each
tool are included in the info manual.

Thanks,
Andrew

>
>> I guess we could restructure things somehow so that the man page part is
>> used in some way such that the duplication is removed?  But that seems
>> like a bigger refactoring task; there is already lots of duplication
>> between the man page and the info manual, so I think trying to solve the
>> problem just for this one option doesn't make much sense.
>
> I meant duplication in the manual, not between the manual and the man
> page.


  reply	other threads:[~2023-12-04 15:57 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-07 18:03 [PATCH 0/3] Improve debug output support in gdbserver Andrew Burgess
2023-11-07 18:03 ` [PATCH 1/3] gdbserver: cleanup monitor_show_help Andrew Burgess
2023-11-22 15:21   ` Andrew Burgess
2023-11-07 18:03 ` [PATCH 2/3] gdbserver: allow the --debug command line option to take a value Andrew Burgess
2023-11-07 19:41   ` Eli Zaretskii
2023-11-30 18:31     ` Andrew Burgess
2023-11-30 19:20       ` Eli Zaretskii
2023-12-04 15:57         ` Andrew Burgess [this message]
2023-12-04 16:21           ` Eli Zaretskii
2023-12-05 10:17             ` Andrew Burgess
2023-12-05 13:06               ` Eli Zaretskii
2023-11-07 18:03 ` [PATCH 3/3] gdbserver: allow for general 'monitor set debug COMPONENT VALUE' use Andrew Burgess
2023-11-17 14:43 ` [PATCH 0/3] Improve debug output support in gdbserver Tom Tromey
2023-11-17 14:55 ` Tom Tromey
2023-11-30 18:44 ` [PATCHv2 " Andrew Burgess
2023-11-30 18:44   ` [PATCHv2 1/3] gdb: fix GDB_DEBUG and GDBSERVER_DEBUG Makefile variables Andrew Burgess
2023-11-30 18:44   ` [PATCHv2 2/3] gdbserver: allow the --debug command line option to take a value Andrew Burgess
2023-11-30 18:44   ` [PATCHv2 3/3] gdbserver: allow for general 'monitor set debug COMPONENT VALUE' use Andrew Burgess
2023-11-30 19:30     ` Eli Zaretskii
2023-12-01 18:02   ` [PATCHv2 0/3] Improve debug output support in gdbserver Tom Tromey
2023-12-08 18:03     ` Andrew Burgess

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=87il5egdut.fsf@redhat.com \
    --to=aburgess@redhat.com \
    --cc=eliz@gnu.org \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).