[PATCH v2 19/24] Introduce complete_command
Tom Tromey
tom@tromey.com
Mon Jun 3 19:28:00 GMT 2019
>>>>> "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
More information about the Gdb-patches
mailing list