Remove init_cli_cmds
I noticed that init_cli_cmds only installs a command, and so doesn't need to be handled specially. This patch merges it into _initialize_cli_cmds. The help text is constructed dynamically, which is sometimes an indication that special treatment is needed; but in this case it is just to insert the value of "gdbinit", which is created at compile-time and not modified; so this doesn't affect the result. This version also removes the "gdbinit" global. There's no need for it, as GDBINIT can be used instead. Note, though, that the help text in question must still be dynamically constructed, in order to be i18n-friendly. gdb/ChangeLog 2019-07-11 Tom Tromey <tromey@adacore.com> * main.c (get_init_files): Use GDBINIT, not gdbinit. * auto-load.c (file_is_auto_load_safe): Use GDBINIT, not gdbinit. * top.h (gdbinit): Don't declare. * cli/cli-cmds.c (init_cli_cmds): Remove, merging contents into... (_initialize_cli_cmds): ...here. Use GDBINIT, not gdbinit. * top.c (gdb_init): Don't call init_cli_cmds. (gdbinit): Remove. * cli/cli-cmds.h (init_cli_cmds): Don't declare.
This commit is contained in:
parent
72ee03ff58
commit
b777eb6de2
7 changed files with 18 additions and 21 deletions
|
@ -105,8 +105,6 @@ extern struct cmd_list_element *showchecklist;
|
|||
|
||||
void init_cmd_lists (void);
|
||||
|
||||
void init_cli_cmds (void);
|
||||
|
||||
int is_complete_command (struct cmd_list_element *cmd);
|
||||
|
||||
/* Exported to gdb/main.c */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue