public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/29625] New: The help document of gdb misses some options
@ 2022-09-28 11:29 mengda2020 at iscas dot ac.cn
  0 siblings, 0 replies; only message in thread
From: mengda2020 at iscas dot ac.cn @ 2022-09-28 11:29 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=29625

            Bug ID: 29625
           Summary: The help document of gdb misses some options
           Product: gdb
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: mengda2020 at iscas dot ac.cn
  Target Milestone: ---

For version GNU gdb (GDB) 13.0.50.20220805-git, the "--help" option of gdb
misses the option "annotate" , "eix", "eiex" , "z", "y" and "statistics". 

1) For the option "annotate", the following code appears during option parsing
and modifies the annotation_level in gdb/main.c:856-858 for version GNU gdb
(GDB) 13.0.50.20220805-git.

            /* FIXME: what if the syntax is wrong (e.g. not digits)?  */
            annotation_level = atoi (optarg);
            break;

2) For the option "eix", the following code appears during option parsing and
calls cmdarg_vec.emplace_back (CMDARG_EARLYINIT_FILE, optarg)in
gdb/main.c:912-913 for version GNU gdb (GDB) 13.0.50.20220805-git. 

            cmdarg_vec.emplace_back (CMDARG_EARLYINIT_FILE, optarg);
            break;

3) For the option "eiex", the following code appears during option parsing and
calls  cmdarg_vec.emplace_back (CMDARG_EARLYINIT_COMMAND, optarg) in
gdb/main.c:915-916 for version GNU gdb (GDB) 13.0.50.20220805-git. 

            cmdarg_vec.emplace_back (CMDARG_EARLYINIT_COMMAND, optarg);
            break;

4) For the option "z", the following code appears during option parsing and
prints some error information in gdb/main.c:930-935 for version GNU gdb (GDB)
13.0.50.20220805-git. 

            {
              if (!gdbtk_test (optarg))
                error (_("%s: unable to load tclcommand file \"%s\""),
                       gdb_program_name, optarg);
              break;
            }

5) For the option "y", the following code appears during option parsing in
gdb/main.c:937-938 for version GNU gdb (GDB) 13.0.50.20220805-git. 

            /* Backwards compatibility only.  */
            break;

Although it has no actual function, it is still possible forget to modify the
help document after adding the function in a subsequent update.

6) For the option "statistics", the following code appears during option
parsing and calls set_per_command_time and set_per_command_space in
gdb/main.c:860-863 for version GNU gdb (GDB) 13.0.50.20220805-git. 

            /* Enable the display of both time and space usage.  */
            set_per_command_time (1);
            set_per_command_space (1);
            break;

But they do not appear in the document provided by "-h".

It may prevent users from using the relevant function.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-09-28 11:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-28 11:29 [Bug gdb/29625] New: The help document of gdb misses some options mengda2020 at iscas dot ac.cn

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).