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/record.c | |
parent | e0f25bd9717c7973197095523db7c1cdc956cea2 (diff) | |
download | fsf-binutils-gdb-5e84b7eefba5b4299b0ca80aecc5d4e99c195c1e.zip fsf-binutils-gdb-5e84b7eefba5b4299b0ca80aecc5d4e99c195c1e.tar.gz fsf-binutils-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/record.c')
-rw-r--r-- | gdb/record.c | 63 |
1 files changed, 37 insertions, 26 deletions
diff --git a/gdb/record.c b/gdb/record.c index a09137b..6968c30 100644 --- a/gdb/record.c +++ b/gdb/record.c @@ -792,18 +792,24 @@ A size of \"unlimited\" means unlimited lines. The default is 10."), set_cmd_completer (record_cmd, filename_completer); add_com_alias ("rec", record_cmd, class_obscure, 1); - add_basic_prefix_cmd ("record", class_support, - _("Set record options."), &set_record_cmdlist, - 0, &setlist); - add_alias_cmd ("rec", "record", class_obscure, 1, &setlist); - add_show_prefix_cmd ("record", class_support, - _("Show record options."), &show_record_cmdlist, - 0, &showlist); - add_alias_cmd ("rec", "record", class_obscure, 1, &showlist); - add_prefix_cmd ("record", class_support, info_record_command, - _("Info record options."), &info_record_cmdlist, - 0, &infolist); - add_alias_cmd ("rec", "record", class_obscure, 1, &infolist); + + cmd_list_element *set_record_cmd + = add_basic_prefix_cmd ("record", class_support, + _("Set record options."), &set_record_cmdlist, + 0, &setlist); + add_alias_cmd ("rec", set_record_cmd, class_obscure, 1, &setlist); + + cmd_list_element *show_record_cmd + = add_show_prefix_cmd ("record", class_support, + _("Show record options."), &show_record_cmdlist, + 0, &showlist); + add_alias_cmd ("rec", show_record_cmd, class_obscure, 1, &showlist); + + cmd_list_element *info_record_cmd + = add_prefix_cmd ("record", class_support, info_record_command, + _("Info record options."), &info_record_cmdlist, + 0, &infolist); + add_alias_cmd ("rec", info_record_cmd, class_obscure, 1, &infolist); c = add_cmd ("save", class_obscure, cmd_record_save, _("Save the execution log to a file.\n\ @@ -812,26 +818,31 @@ Default filename is 'gdb_record.PROCESS_ID'."), &record_cmdlist); set_cmd_completer (c, filename_completer); - add_cmd ("delete", class_obscure, cmd_record_delete, - _("Delete the rest of execution log and start recording it anew."), - &record_cmdlist); - add_alias_cmd ("d", "delete", class_obscure, 1, &record_cmdlist); - add_alias_cmd ("del", "delete", class_obscure, 1, &record_cmdlist); - - add_cmd ("stop", class_obscure, cmd_record_stop, - _("Stop the record/replay target."), - &record_cmdlist); - add_alias_cmd ("s", "stop", class_obscure, 1, &record_cmdlist); + cmd_list_element *record_delete_cmd + = add_cmd ("delete", class_obscure, cmd_record_delete, + _("Delete the rest of execution log and start recording it \ +anew."), + &record_cmdlist); + add_alias_cmd ("d", record_delete_cmd, class_obscure, 1, &record_cmdlist); + add_alias_cmd ("del", record_delete_cmd, class_obscure, 1, &record_cmdlist); + + cmd_list_element *record_stop_cmd + = add_cmd ("stop", class_obscure, cmd_record_stop, + _("Stop the record/replay target."), + &record_cmdlist); + add_alias_cmd ("s", record_stop_cmd, class_obscure, 1, &record_cmdlist); add_prefix_cmd ("goto", class_obscure, cmd_record_goto, _("\ Restore the program to its state at instruction number N.\n\ Argument is instruction number, as shown by 'info record'."), &record_goto_cmdlist, 1, &record_cmdlist); - add_cmd ("begin", class_obscure, cmd_record_goto_begin, - _("Go to the beginning of the execution log."), - &record_goto_cmdlist); - add_alias_cmd ("start", "begin", class_obscure, 1, &record_goto_cmdlist); + cmd_list_element *record_goto_begin_cmd + = add_cmd ("begin", class_obscure, cmd_record_goto_begin, + _("Go to the beginning of the execution log."), + &record_goto_cmdlist); + add_alias_cmd ("start", record_goto_begin_cmd, class_obscure, 1, + &record_goto_cmdlist); add_cmd ("end", class_obscure, cmd_record_goto_end, _("Go to the end of the execution log."), |