Bug 315959

Summary: valgrind man page has bogus SGCHECK (and no BBV) OPTIONS section
Product: [Developer tools] valgrind Reporter: Mark Wielaard <mark>
Component: sgcheckAssignee: Julian Seward <jseward>
Status: RESOLVED FIXED    
Severity: normal CC: mfranc, naesten, philippe.waroquiers
Priority: NOR    
Version First Reported In: 3.9.0.SVN   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Add sg.opts.list id to para for inclusion in manpage

Description Mark Wielaard 2013-03-01 14:55:44 UTC
doc/xml/valgrind-manpage.xml has the following for every tool:

<refsect1 id="sgcheck-options">
<title>SGcheck Options</title>

<xi:include href="../../exp-sgcheck/docs/sg-manual.xml" 
            xpointer="sg.opts.list"
            xmlns:xi="http://www.w3.org/2001/XInclude" />

</refsect1>

But since sgcheck doesn't have any specific options docs/exp-sgcheck/docs/sg-manual.xml/ has:

<sect1 id="sg-manual.options" xreflabel="SGCheck Command-line Options">
<title>SGCheck Command-line Options</title>

<para id="sg.opts.list">There are no SGCheck-specific command-line options at present.</para>
<!--
<para>SGCheck-specific command-line options are:</para>
<variablelist id="sg.opts.list">
</variablelist>
-->

</sect1>

Note how the variablelist item is (correctly) commented out.

This leads to a malformed valgrind.1 manpage, which says:

SGCHECK OPTIONS
       <xi:include></xi:include>.SH "BBV OPTIONS"

       --bb-out-file=<name> [default: bb.out.%p]
[...]

The fix is to mark the para stating there are no options with the sg.opts.list id.

Reproducible: Always
Comment 1 Mark Wielaard 2013-03-01 14:58:30 UTC
Created attachment 77667 [details]
Add sg.opts.list id to para for inclusion in manpage

With this the valgrind.1 man page properly says:

SGCHECK OPTIONS
       There are no SGCheck-specific command-line options at present.

BBV OPTIONS
       --bb-out-file=<name> [default: bb.out.%p]

[...]
Comment 2 Mark Wielaard 2013-03-01 15:01:44 UTC
(In reply to comment #0)
> But since sgcheck doesn't have any specific options
> docs/exp-sgcheck/docs/sg-manual.xml/ has:
> 
> <sect1 id="sg-manual.options" xreflabel="SGCheck Command-line Options">
> <title>SGCheck Command-line Options</title>
> 
> <para id="sg.opts.list">There are no SGCheck-specific command-line options
> at present.</para>
> <!--
> <para>SGCheck-specific command-line options are:</para>
> <variablelist id="sg.opts.list">
> </variablelist>
> -->
> 
> </sect1>

Doh, I quoted the fixed verion. The original doesn't have the  <para id="sg.opts.list"> obviously.
Comment 3 Mark Wielaard 2013-03-04 22:30:23 UTC
Someone looking into this might also want to look at two other manpage issues:
Bug 316144 - valgrind.1 manpage contains unknown ??? strings for some core option references
Bug 316145 - callgrind command line options in manpage reference (unknown) callgrind manual
Comment 4 Philippe Waroquiers 2013-03-10 16:20:56 UTC
Committed revision 13323.
Thanks for the patch
Comment 5 Julian Seward 2013-03-26 10:06:57 UTC
*** Bug 312907 has been marked as a duplicate of this bug. ***