]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb: remove context parameter from add_setshow_enum_cmd
authorSimon Marchi <simon.marchi@polymtl.ca>
Sat, 26 Jun 2021 01:38:25 +0000 (21:38 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Sat, 26 Jun 2021 01:39:26 +0000 (21:39 -0400)
commit4c0ba02a749d84a7e569e010fca9f640c30d17df
treedb5935ef09b75752a45b41f724d63e0c1c7d6c69
parentd6ff04a343f97026f7d23bb036e0f858b21f3bfd
gdb: remove context parameter from add_setshow_enum_cmd

I propose removing the context parameter from add_setshow_enum_cmd.  It
was useful before add_setshow_enum_cmd returned both created commands,
as the caller couldn't easily set the context itself.  But now, I think
it's fine to just let the caller do it.

gdb/ChangeLog:

* command.h (add_setshow_enum_cmd): Remove context parameter.
* cli/cli-decode.c (add_setshow_enum_cmd): Likewise, and don't
set context.
* cli/cli-style.c (cli_style_option::add_setshow_commands): Set
context here.

Change-Id: I377c4e6820ec9d5069492ed28f4cba342ce1336e
gdb/ChangeLog
gdb/cli/cli-decode.c
gdb/cli/cli-style.c
gdb/command.h