]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
binutils: Fix broken numbering in strip/objcopy --only-keep-debug doc
authorThiago C Silva <opsrcodev@gmail.com>
Thu, 22 Jan 2026 11:03:43 +0000 (12:03 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 22 Jan 2026 11:04:33 +0000 (12:04 +0100)
The documentation for --only-keep-debug displayed the procedure steps as
"1. 1. 1. 1." in the man pages, despite using the @enumerate command.

This patch moves the item text to the line following the @item tag and
adds whitespace between items. This forces the man page generator to
correctly distinguish the items and increment the list counter.

binutils/
        * doc/binutils.texi (strip, objcopy): Reformat @enumerate list
        to fix man page numbering.

binutils/doc/binutils.texi

index 3a4ed61f9595a9ec34c17335b3b86931f72d807f..42957cba5b50b71266c10cc1f43fd2b41bdc6a8f 100644 (file)
@@ -2086,14 +2086,20 @@ needed if debugging abilities are required.  The suggested procedure
 to create these files is as follows:
 
 @enumerate
-@item Link the executable as normal.  Assuming that it is called
-@code{foo} then...
-@item Run @code{objcopy --only-keep-debug foo foo.dbg} to
-create a file containing the debugging info.
-@item Run @code{objcopy --strip-debug foo} to create a
-stripped executable.
-@item Run @code{objcopy --add-gnu-debuglink=foo.dbg foo}
-to add a link to the debugging info into the stripped executable.
+@item
+Link the executable as normal.  Assuming that it is called @code{foo}
+then...
+
+@item
+Run @code{objcopy --only-keep-debug foo foo.dbg} to create a file
+containing the debugging info.
+
+@item
+Run @code{objcopy --strip-debug foo} to create a stripped executable.
+
+@item
+Run @code{objcopy --add-gnu-debuglink=foo.dbg foo} to add a link to the
+debugging info into the stripped executable.
 @end enumerate
 
 Note---the choice of @code{.dbg} as an extension for the debug info
@@ -2101,10 +2107,17 @@ file is arbitrary.  Also the @code{--only-keep-debug} step is
 optional.  You could instead do this:
 
 @enumerate
-@item Link the executable as normal.
-@item Copy @code{foo} to  @code{foo.full}
-@item Run @code{objcopy --strip-debug foo}
-@item Run @code{objcopy --add-gnu-debuglink=foo.full foo}
+@item
+Link the executable as normal.
+
+@item
+Copy @code{foo} to @code{foo.full}.
+
+@item
+Run @code{objcopy --strip-debug foo}.
+
+@item
+Run @code{objcopy --add-gnu-debuglink=foo.full foo}.
 @end enumerate
 
 i.e., the file pointed to by the @option{--add-gnu-debuglink} can be the
@@ -3809,14 +3822,20 @@ needed if debugging abilities are required.  The suggested procedure
 to create these files is as follows:
 
 @enumerate
-@item Link the executable as normal.  Assuming that it is called
-@code{foo} then...
-@item Run @code{objcopy --only-keep-debug foo foo.dbg} to
-create a file containing the debugging info.
-@item Run @code{objcopy --strip-debug foo} to create a
-stripped executable.
-@item Run @code{objcopy --add-gnu-debuglink=foo.dbg foo}
-to add a link to the debugging info into the stripped executable.
+@item
+Link the executable as normal.  Assuming that it is called @code{foo}
+then...
+
+@item
+Run @code{objcopy --only-keep-debug foo foo.dbg} to create a file
+containing the debugging info.
+
+@item
+Run @code{strip --strip-debug foo} to create a stripped executable.
+
+@item
+Run @code{objcopy --add-gnu-debuglink=foo.dbg foo} to add a link to the
+debugging info into the stripped executable.
 @end enumerate
 
 Note---the choice of @code{.dbg} as an extension for the debug info
@@ -3824,10 +3843,17 @@ file is arbitrary.  Also the @code{--only-keep-debug} step is
 optional.  You could instead do this:
 
 @enumerate
-@item Link the executable as normal.
-@item Copy @code{foo} to @code{foo.full}
-@item Run @code{strip --strip-debug foo}
-@item Run @code{objcopy --add-gnu-debuglink=foo.full foo}
+@item
+Link the executable as normal.
+
+@item
+Copy @code{foo} to @code{foo.full}.
+
+@item
+Run @code{strip --strip-debug foo}.
+
+@item
+Run @code{objcopy --add-gnu-debuglink=foo.full foo}.
 @end enumerate
 
 i.e., the file pointed to by the @option{--add-gnu-debuglink} can be the