aboutsummaryrefslogtreecommitdiff
path: root/gdb/infcmd.c
diff options
context:
space:
mode:
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>2020-05-10 21:36:14 +0200
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>2020-05-15 22:17:46 +0200
commit57b4f16e494d8abdeb0748c69e72f911b3525b44 (patch)
treedfc66c3910d9bce236f778816771264549e74372 /gdb/infcmd.c
parent7c05caf72d31d7382819f1113fdcf13c45729a8d (diff)
downloadgdb-57b4f16e494d8abdeb0748c69e72f911b3525b44.zip
gdb-57b4f16e494d8abdeb0748c69e72f911b3525b44.tar.gz
gdb-57b4f16e494d8abdeb0748c69e72f911b3525b44.tar.bz2
Ensure class_alias is only used for user-defined aliases.
This commit finally does the (small) change that started this patch series. It ensures that the class_alias is only used for user-defined aliases. So, the few GDB pre-defined aliases that were using the 'class_alias' class are now using a real help class, typically the class of the aliased command. gdb/ChangeLog 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be> * command.h (enum command_class): Improve comments, document that class_alias is for user-defined aliases, give the class name for each class, remove unused class_xdb. * cli/cli-decode.c (add_com_alias): Document THECLASS intended usage. * breakpoint.c (_initialize_breakpoint): Replace class_alias by a precise class. * infcmd.c (_initialize_infcmd): Likewise. * reverse.c (_initialize_reverse): Likewise. * stack.c (_initialize_stack): Likewise. * symfile.c (_initialize_symfile): Likewise. * tracepoint.c (_initialize_tracepoint): Likewise. gdb/testsuite/ChangeLog 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be> * gdb.base/alias.exp: Verify 'help aliases' shows user defined aliases.
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r--gdb/infcmd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 8b01f45..32905a7 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -3180,7 +3180,7 @@ is restored."),
cmd_name = "inferior-tty";
c = lookup_cmd (&cmd_name, setlist, "", -1, 1);
gdb_assert (c != NULL);
- add_alias_cmd ("tty", c, class_alias, 0, &cmdlist);
+ add_alias_cmd ("tty", c, class_run, 0, &cmdlist);
cmd_name = "args";
add_setshow_string_noescape_cmd (cmd_name, class_run,
@@ -3318,14 +3318,14 @@ Step one instruction exactly.\n\
Usage: stepi [N]\n\
Argument N means step N times (or till program stops for another \
reason)."));
- add_com_alias ("si", "stepi", class_alias, 0);
+ add_com_alias ("si", "stepi", class_run, 0);
add_com ("nexti", class_run, nexti_command, _("\
Step one instruction, but proceed through subroutine calls.\n\
Usage: nexti [N]\n\
Argument N means step N times (or till program stops for another \
reason)."));
- add_com_alias ("ni", "nexti", class_alias, 0);
+ add_com_alias ("ni", "nexti", class_run, 0);
add_com ("finish", class_run, finish_command, _("\
Execute until selected stack frame returns.\n\