diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2021-05-27 13:59:01 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2021-05-27 14:00:08 -0400 |
commit | 5e84b7eefba5b4299b0ca80aecc5d4e99c195c1e (patch) | |
tree | 65d675353e6cb9f90711947244a8f78d156f7021 /gdb/printcmd.c | |
parent | e0f25bd9717c7973197095523db7c1cdc956cea2 (diff) | |
download | gdb-5e84b7eefba5b4299b0ca80aecc5d4e99c195c1e.zip gdb-5e84b7eefba5b4299b0ca80aecc5d4e99c195c1e.tar.gz gdb-5e84b7eefba5b4299b0ca80aecc5d4e99c195c1e.tar.bz2 |
gdb: remove add_alias_cmd overload that accepts a string
Same idea as previous patch, but for add_alias_cmd. Remove the overload
that accepts the target command as a string (the target command name),
leaving only the one that takes the cmd_list_element.
gdb/ChangeLog:
* command.h (add_alias_cmd): Accept target as
cmd_list_element. Update callers.
Change-Id: I546311f411e9e7da9302322d6ffad4e6c56df266
Diffstat (limited to 'gdb/printcmd.c')
-rw-r--r-- | gdb/printcmd.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/printcmd.c b/gdb/printcmd.c index 8daa87c..7eba299 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -3304,7 +3304,8 @@ current working language. The result is printed and saved in the value\n\ history, if it is not void.")); set_cmd_completer_handle_brkchars (c, print_command_completer); - add_cmd ("variable", class_vars, set_command, _("\ + cmd_list_element *set_variable_cmd + = add_cmd ("variable", class_vars, set_command, _("\ Evaluate expression EXP and assign result to variable VAR.\n\ Usage: set variable VAR = EXP\n\ This uses assignment syntax appropriate for the current language\n\ @@ -3313,8 +3314,8 @@ VAR may be a debugger \"convenience\" variable (names starting\n\ with $), a register (a few standard names starting with $), or an actual\n\ variable in the program being debugged. EXP is any valid expression.\n\ This may usually be abbreviated to simply \"set\"."), - &setlist); - add_alias_cmd ("var", "variable", class_vars, 0, &setlist); + &setlist); + add_alias_cmd ("var", set_variable_cmd, class_vars, 0, &setlist); const auto print_opts = make_value_print_options_def_group (nullptr); |