forked from Imagelibrary/binutils-gdb
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.
This commit is contained in:
@@ -1006,7 +1006,10 @@ add_com (const char *name, enum command_class theclass,
|
||||
return add_cmd (name, theclass, fun, doc, &cmdlist);
|
||||
}
|
||||
|
||||
/* Add an alias or abbreviation command to the list of commands. */
|
||||
/* Add an alias or abbreviation command to the list of commands.
|
||||
For aliases predefined by GDB (such as bt), THECLASS must be
|
||||
different of class_alias, as class_alias is used to identify
|
||||
user defined aliases. */
|
||||
|
||||
struct cmd_list_element *
|
||||
add_com_alias (const char *name, const char *oldname, enum command_class theclass,
|
||||
|
||||
Reference in New Issue
Block a user