Implement user defined prefix.
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sun, 8 Sep 2019 13:48:32 +0000 (15:48 +0200)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sat, 30 Nov 2019 08:36:19 +0000 (09:36 +0100)
commitc6ac7fc98718d7e472e1e1c12aae9855c79353a5
tree0bf31537b160a0ecb05b60880735e15e8ec18b1b
parentce4331325cd8407c32407c03e3126fb1dc120304
Implement user defined prefix.

This patch adds the new 'define-prefix' command that creates (or mark an
existing user defined command) as a prefix command.
This approach was preferred compared to add a -prefix option to
'define' command : with define-prefix, a command can be defined and
afterwards marked as a prefix.  Also, it is easier to define a
'prefix' only command in one operation.

This patch also adds completers for the 'define' and 'document' commands.
This makes it easier for the user to type the prefixes for 'define'
and type the documented command name for 'document'.

gdb/ChangeLog
2019-11-30  Philippe Waroquiers  <philippe.waroquiers@skynet.be>

* cli/cli-script.c (do_define_command): Ensure a redefined
prefix command is kept as a prefix command.
(define_prefix_command): New function.
(show_user_1): Report user defined prefixes.
(_initialize_cli_script):  Create the new 'define-prefix' command.
Add completers for 'define' and 'document'.
* top.c (execute_command):  If command is a user-defined prefix only
command, report the list of commands for this prefix command.
gdb/ChangeLog
gdb/cli/cli-script.c
gdb/top.c
This page took 0.025288 seconds and 4 git commands to generate.