aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.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/breakpoint.c
parent7c05caf72d31d7382819f1113fdcf13c45729a8d (diff)
downloadfsf-binutils-gdb-57b4f16e494d8abdeb0748c69e72f911b3525b44.zip
fsf-binutils-gdb-57b4f16e494d8abdeb0748c69e72f911b3525b44.tar.gz
fsf-binutils-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/breakpoint.c')
-rw-r--r--gdb/breakpoint.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 480f095..15d76d4 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -15478,7 +15478,7 @@ A disabled breakpoint is not forgotten, but has no effect until re-enabled."),
add_com_alias ("dis", "disable", class_breakpoint, 1);
add_com_alias ("disa", "disable", class_breakpoint, 1);
- add_cmd ("breakpoints", class_alias, disable_command, _("\
+ add_cmd ("breakpoints", class_breakpoint, disable_command, _("\
Disable all or some breakpoints.\n\
Usage: disable breakpoints [BREAKPOINTNUM]...\n\
Arguments are breakpoint numbers with spaces in between.\n\
@@ -15498,7 +15498,7 @@ Also a prefix command for deletion of other GDB objects."),
add_com_alias ("d", "delete", class_breakpoint, 1);
add_com_alias ("del", "delete", class_breakpoint, 1);
- add_cmd ("breakpoints", class_alias, delete_command, _("\
+ add_cmd ("breakpoints", class_breakpoint, delete_command, _("\
Delete all or some breakpoints or auto-display expressions.\n\
Usage: delete breakpoints [BREAKPOINTNUM]...\n\
Arguments are breakpoint numbers with spaces in between.\n\
@@ -15686,10 +15686,10 @@ BREAK_ARGS_HELP ("trace") "\n\
Do \"help tracepoints\" for info on other tracepoint commands."));
set_cmd_completer (c, location_completer);
- add_com_alias ("tp", "trace", class_alias, 0);
- add_com_alias ("tr", "trace", class_alias, 1);
- add_com_alias ("tra", "trace", class_alias, 1);
- add_com_alias ("trac", "trace", class_alias, 1);
+ add_com_alias ("tp", "trace", class_breakpoint, 0);
+ add_com_alias ("tr", "trace", class_breakpoint, 1);
+ add_com_alias ("tra", "trace", class_breakpoint, 1);
+ add_com_alias ("trac", "trace", class_breakpoint, 1);
c = add_com ("ftrace", class_breakpoint, ftrace_command, _("\
Set a fast tracepoint at specified location.\n\