Bug 10619 - gdb - Manual and info pages should present GNU --long options
Summary: gdb - Manual and info pages should present GNU --long options
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: build (show other bugs)
Version: 6.8
: P2 enhancement
Target Milestone: 6.8
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-09 08:49 UTC by Jari Aalto
Modified: 2021-11-09 17:31 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jari Aalto 2009-09-09 08:49:45 UTC
In gdb info file:

 2.1.1 Choosing Files
--------------------
 Many options have both long and short forms; both are shown in the
following list.  GDB also recognizes the long forms if you truncate
them, so long as enough of the option is present to be unambiguous.
(If you prefer, you can flag option arguments with `--' rather than
`-', though we illustrate the more usual convention.)


In manual pages:

       -help

       -h     List all options, with brief explanations.

       -symbols=file

       -s file
               Read symbol table from file file.
...

SUGGESTION

Please prefer listing the --long option names with two dashes (--) and not with 
single dash, although that may be still valid. The sinlge dash -option syntax 
is confusing, when compared to options that can be stacked e.g. in GNU ls(1) -
laF...", not so in GNU gdb.

The GNU tools traditionally use --option syntax in their manuals.
Comment 1 dilyan.palauzov@aegee.org 2017-05-07 15:29:54 UTC
./gdb -h versus info '(gdb)Mode Options'


Info nodes "Choosing modes" and "Startup', write about "-nx" with one dash, but "gdb -h" speaks about "--nx" with two dashes.  Likewise for "-nh"/"--nh".

gdb -h does not mention just "-n".

In fact 'Choosing modes' mentions every option with one dash, while "gdb -h" states that only single-letter options are with one dash.

All of the single-dash/double-dash long-name options I tried do work, but this does not justify inconsistent documentation.
Comment 2 Guinevere Larsen 2021-11-09 17:31:59 UTC
Commit 2047d95b897c7153368033c318185429f7809e4f fixes this, so I'm closing this issue