From: Natalia Saiapova This might be useful, if some commands need to have a special case if run w/o arguments. I am going to use it in gdb: refine commands to control scheduler locking. to keep the old behaviour of the set scheduler-locking step which should set both set scheduler-locking step on set scheduler-locking replay step on To do this, the set-command needs to detect that it was issued without arguments and have a special handling for this. Without the special handling, the command set scheduler-locking step would set only set scheduler-locking step on Approved-By: Tom Tromey --- gdb/cli/cli-setshow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c index 7688da015de..f1f313a4cd0 100644 --- a/gdb/cli/cli-setshow.c +++ b/gdb/cli/cli-setshow.c @@ -455,7 +455,7 @@ do_set_command (const char *arg, int from_tty, struct cmd_list_element *c) error (_("gdb internal error: bad var_type in do_setshow_command")); } - c->func (NULL, from_tty, c); + c->func (arg, from_tty, c); if (notify_command_param_changed_p (option_changed, c)) { -- 2.34.1