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/gnu-nat.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/gnu-nat.c')
-rw-r--r-- | gdb/gnu-nat.c | 54 |
1 files changed, 32 insertions, 22 deletions
diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c index aadd3e8..67ce00e 100644 --- a/gdb/gnu-nat.c +++ b/gdb/gnu-nat.c @@ -3197,25 +3197,31 @@ Show whether new threads are allowed to run (once gdb has noticed them)."), _("Show the default detach-suspend-count value for new threads."), &show_thread_default_cmd_list); - add_cmd ("signals", class_run, set_signals_cmd, _("\ + cmd_list_element *set_signals_cmd + = add_cmd ("signals", class_run, set_signals_cmd, _("\ Set whether the inferior process's signals will be intercepted.\n\ Mach exceptions (such as breakpoint traps) are not affected."), - &setlist); - add_alias_cmd ("sigs", "signals", class_run, 1, &setlist); - add_cmd ("signals", no_class, show_signals_cmd, _("\ + &setlist); + add_alias_cmd ("sigs", set_signals_cmd, class_run, 1, &setlist); + + cmd_list_element *show_signals_cmd + = add_cmd ("signals", no_class, show_signals_cmd, _("\ Show whether the inferior process's signals will be intercepted."), - &showlist); - add_alias_cmd ("sigs", "signals", no_class, 1, &showlist); + &showlist); + add_alias_cmd ("sigs", show_signals_cmd, no_class, 1, &showlist); - add_cmd ("signal-thread", class_run, set_sig_thread_cmd, _("\ + cmd_list_element *set_signal_thread_cmd + = add_cmd ("signal-thread", class_run, set_sig_thread_cmd, _("\ Set the thread that gdb thinks is the libc signal thread.\n\ This thread is run when delivering a signal to a non-stopped process."), - &setlist); - add_alias_cmd ("sigthread", "signal-thread", class_run, 1, &setlist); - add_cmd ("signal-thread", no_class, show_sig_thread_cmd, _("\ + &setlist); + add_alias_cmd ("sigthread", set_signal_thread_cmd, class_run, 1, &setlist); + + cmd_list_element *show_signal_thread_cmd + = add_cmd ("signal-thread", no_class, show_sig_thread_cmd, _("\ Set the thread that gdb thinks is the libc signal thread."), - &showlist); - add_alias_cmd ("sigthread", "signal-thread", no_class, 1, &showlist); + &showlist); + add_alias_cmd ("sigthread", show_signal_thread_cmd, no_class, 1, &showlist); add_cmd ("stopped", class_run, set_stopped_cmd, _("\ Set whether gdb thinks the inferior process is stopped as with SIGSTOP.\n\ @@ -3225,13 +3231,14 @@ Stopped process will be continued by sending them a signal."), Show whether gdb thinks the inferior process is stopped as with SIGSTOP."), &showlist); - add_cmd ("exceptions", class_run, set_exceptions_cmd, _("\ + cmd_list_element *set_exceptions_cmd + = add_cmd ("exceptions", class_run, set_exceptions_cmd, _("\ Set whether exceptions in the inferior process will be trapped.\n\ When exceptions are turned off, neither breakpoints nor single-stepping\n\ -will work."), - &setlist); +will work."), &setlist); /* Allow `set exc' despite conflict with `set exception-port'. */ - add_alias_cmd ("exc", "exceptions", class_run, 1, &setlist); + add_alias_cmd ("exc", set_exceptions_cmd, class_run, 1, &setlist); + add_cmd ("exceptions", no_class, show_exceptions_cmd, _("\ Show whether exceptions in the inferior process will be trapped."), &showlist); @@ -3262,12 +3269,14 @@ used to pause individual threads by default instead."), "on the thread when detaching."), &show_task_cmd_list); - add_cmd ("exception-port", no_class, set_task_exc_port_cmd, _("\ + cmd_list_element *set_task_exception_port_cmd + = add_cmd ("exception-port", no_class, set_task_exc_port_cmd, _("\ Set the task exception port to which we forward exceptions.\n\ The argument should be the value of the send right in the task."), - &set_task_cmd_list); - add_alias_cmd ("excp", "exception-port", no_class, 1, &set_task_cmd_list); - add_alias_cmd ("exc-port", "exception-port", no_class, 1, + &set_task_cmd_list); + add_alias_cmd ("excp", set_task_exception_port_cmd, no_class, 1, + &set_task_cmd_list); + add_alias_cmd ("exc-port", set_task_exception_port_cmd, no_class, 1, &set_task_cmd_list); /* A convenient way of turning on all options require to noninvasively @@ -3458,8 +3467,9 @@ Set the thread exception port to which we forward exceptions.\n\ This overrides the task exception port.\n\ The argument should be the value of the send right in the task."), &set_thread_cmd_list); - add_alias_cmd ("excp", "exception-port", no_class, 1, &set_thread_cmd_list); - add_alias_cmd ("exc-port", "exception-port", no_class, 1, + add_alias_cmd ("excp", set_thread_exception_port_cmd, no_class, 1, + &set_thread_cmd_list); + add_alias_cmd ("exc-port", set_thread_exception_port_cmd, no_class, 1, &set_thread_cmd_list); add_cmd ("takeover-suspend-count", no_class, thread_takeover_sc_cmd, _("\ |