[RFA 09/10] Ensure class_alias is only used for user-defined aliases.

Philippe Waroquiers philippe.waroquiers@skynet.be
Thu May 14 21:12:02 GMT 2020


On Thu, 2020-05-14 at 11:33 -0600, Tom Tromey wrote:
> Philippe> +  add_com_alias ("tp", "trace", class_breakpoint, 0);
> Philippe> +  add_com_alias ("tr", "trace", class_breakpoint, 1);
> Philippe> +  add_com_alias ("tra", "trace", class_breakpoint, 1);
> Philippe> +  add_com_alias ("trac", "trace", class_breakpoint, 1);
> 
> I wonder if there's ever a case where we want an alias to have a
> different class from the thing it aliases.  If not, maybe add_com_alias
> could just do this and we could remove the parameter.
I also wondered but decided to not do this, at least for the moment.

The advantage of allowing another class for an alias and for its aliased
command is that this can be used to 'market' the same GDB functionality
via different classes.
 
Now that the help shows the command and all its aliases, that might
help some users to find a certain command via different classes,
in case such a command could reasonably be related to more than
one class.

Thanks for the review, I have handled all your comments and the comments
of Eli about the documentation, and will send an RFAv2 soon.

Thanks

Philippe




More information about the Gdb-patches mailing list