public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
To: Tom Tromey <tom@tromey.com>,
	Philippe Waroquiers via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [RFA 09/10] Ensure class_alias is only used for user-defined aliases.
Date: Thu, 14 May 2020 23:12:02 +0200	[thread overview]
Message-ID: <1d9f53f1d16979fff785040784aa047bd2b4e22b.camel@skynet.be> (raw)
In-Reply-To: <87eerm1kx3.fsf@tromey.com>

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



  reply	other threads:[~2020-05-14 21:12 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-10 20:55 [RFA 00/10] fix/improve cmd structure, class_alias, help, apropos Philippe Waroquiers
2020-05-10 20:55 ` [RFA 01/10] Add a selftest that detects a 'corrupted' command tree structure in GDB Philippe Waroquiers
2020-05-14 15:51   ` Tom Tromey
2020-05-10 20:55 ` [RFA 02/10] Fix the only incorrect case found by command_structure_invariants selftest Philippe Waroquiers
2020-05-14 15:52   ` Tom Tromey
2020-05-10 20:55 ` [RFA 03/10] Fix problem that alias can be defined or not depending on the order Philippe Waroquiers
2020-05-14 16:00   ` Tom Tromey
2020-05-10 20:55 ` [RFA 04/10] command-def-selftests.c: detect missing or wrong prefix cmd in subcommands Philippe Waroquiers
2020-05-14 15:54   ` Tom Tromey
2020-05-10 20:55 ` [RFA 05/10] Fix the problems reported by prefix check of command-def-selftests.c Philippe Waroquiers
2020-05-14 16:07   ` Tom Tromey
2020-05-10 20:55 ` [RFA 06/10] Fix inconsistent output of prefix and bugs in 'show' command Philippe Waroquiers
2020-05-14 16:16   ` Tom Tromey
2020-05-10 20:55 ` [RFA 07/10] Fix/improve 'help CLASS' output Philippe Waroquiers
2020-05-14 16:26   ` Tom Tromey
2020-05-10 20:55 ` [RFA 08/10] Fix/improve 'apropos' output Philippe Waroquiers
2020-05-14 16:30   ` Tom Tromey
2020-05-10 20:55 ` [RFA 09/10] Ensure class_alias is only used for user-defined aliases Philippe Waroquiers
2020-05-14 17:33   ` Tom Tromey
2020-05-14 21:12     ` Philippe Waroquiers [this message]
2020-05-10 20:55 ` [RFA 10/10] Update NEWS and documentation for help and apropos changes Philippe Waroquiers
2020-05-11 14:34   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1d9f53f1d16979fff785040784aa047bd2b4e22b.camel@skynet.be \
    --to=philippe.waroquiers@skynet.be \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).