[v7,3/6] gdb, cli: pass the argument of a set command to its callback.
Checks
| Context |
Check |
Description |
| linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_gdb_build--master-arm |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_gdb_check--master-arm |
success
|
Test passed
|
| linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 |
success
|
Test passed
|
Commit Message
From: Natalia Saiapova <natalia.saiapova@intel.com>
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 <tom@tromey.com>
---
gdb/cli/cli-setshow.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -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))
{