This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 19/24] Introduce complete_command
- From: Tom Tromey <tom at tromey dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 03 Jun 2019 13:28:16 -0600
- Subject: Re: [PATCH v2 19/24] Introduce complete_command
- References: <20190530195333.20448-1-palves@redhat.com> <20190530195333.20448-20-palves@redhat.com>
>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
Pedro> This adds a completion helper routine that makes it possible for a
Pedro> command that takes another command as argument, such as "frame apply
Pedro> all COMMAND" as "thread apply all COMMAND", to complete on COMMAND,
Pedro> and have the completion machinery recurse and complete COMMAND as if
Pedro> you tried to complete "(gdb) COMMAND". I.e., we'll be able to
Pedro> complete like this, for example:
Pedro> * completer.c (complete_command): New.
I think that the function should have a different name. Traditionally,
*_command is the name of the command "*" in gdb, and there's already a
function called complete_command. Overloading makes this not matter too
much, but I also think it's best to reserve overloading for functions
that are semantically similar.
Tom