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/valprint.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/valprint.c')
-rw-r--r-- | gdb/valprint.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/gdb/valprint.c b/gdb/valprint.c index e191c35..fa2b64e 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -3143,18 +3143,20 @@ _initialize_valprint () { cmd_list_element *cmd; - add_basic_prefix_cmd ("print", no_class, - _("Generic command for setting how things print."), - &setprintlist, 0, &setlist); - add_alias_cmd ("p", "print", no_class, 1, &setlist); + cmd_list_element *set_print_cmd + = add_basic_prefix_cmd ("print", no_class, + _("Generic command for setting how things print."), + &setprintlist, 0, &setlist); + add_alias_cmd ("p", set_print_cmd, no_class, 1, &setlist); /* Prefer set print to set prompt. */ - add_alias_cmd ("pr", "print", no_class, 1, &setlist); - - add_show_prefix_cmd ("print", no_class, - _("Generic command for showing print settings."), - &showprintlist, 0, &showlist); - add_alias_cmd ("p", "print", no_class, 1, &showlist); - add_alias_cmd ("pr", "print", no_class, 1, &showlist); + add_alias_cmd ("pr", set_print_cmd, no_class, 1, &setlist); + + cmd_list_element *show_print_cmd + = add_show_prefix_cmd ("print", no_class, + _("Generic command for showing print settings."), + &showprintlist, 0, &showlist); + add_alias_cmd ("p", show_print_cmd, no_class, 1, &showlist); + add_alias_cmd ("pr", show_print_cmd, no_class, 1, &showlist); cmd = add_basic_prefix_cmd ("raw", no_class, _("\ |