Patchwork [RFA] Fix/improve on-line help of 'define' command.

login
register
mail settings
Submitter Philippe Waroquiers
Date June 4, 2018, 9:31 p.m.
Message ID <20180604213136.32395-1-philippe.waroquiers@skynet.be>
Download mbox | patch
Permalink /patch/27625/
State New
Headers show

Comments

Philippe Waroquiers - June 4, 2018, 9:31 p.m.
While I was playing with 'define' to understand how some quoting was
done (or not done), I found an inconsistency between the doc
and the online help.
=> the doc is correct, so fixing/improving the on-line help.

2018-06-04  Philippe Waroquiers  <philippe.waroquiers@skynet.be>

	* cli/cli-script.c (_initialize_cli_script): Fix online documentation
        of 'define' command.
---
 gdb/cli/cli-script.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Philippe Waroquiers - June 12, 2018, 9:58 p.m.
Ping ?

On Mon, 2018-06-04 at 23:31 +0200, Philippe Waroquiers wrote:
> While I was playing with 'define' to understand how some quoting was
> done (or not done), I found an inconsistency between the doc
> and the online help.
> => the doc is correct, so fixing/improving the on-line help.
> 
> 2018-06-04  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
> 
> 	* cli/cli-script.c (_initialize_cli_script): Fix online documentation
>         of 'define' command.
> ---
>  gdb/cli/cli-script.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
> index 72de8ec1c7..8ceecdf435 100644
> --- a/gdb/cli/cli-script.c
> +++ b/gdb/cli/cli-script.c
> @@ -1602,7 +1602,8 @@ Define a new command name.  Command name is argument.\n\
>  Definition appears on following lines, one command per line.\n\
>  End with a line of just \"end\".\n\
>  Use the \"document\" command to give documentation for the new command.\n\
> -Commands defined in this way may have up to ten arguments."));
> +Commands defined in this way may accept an unlimited number of arguments\n\
> +accessed via $arg0 .. $argN. $argc tells how many arguments have been passed."));
>  
>    add_com ("while", class_support, while_command, _("\
>  Execute nested commands WHILE the conditional expression is non zero.\n\
Simon Marchi - June 13, 2018, 11:19 a.m.
On 2018-06-04 05:31 PM, Philippe Waroquiers wrote:
> While I was playing with 'define' to understand how some quoting was
> done (or not done), I found an inconsistency between the doc
> and the online help.
> => the doc is correct, so fixing/improving the on-line help.
> 
> 2018-06-04  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
> 
> 	* cli/cli-script.c (_initialize_cli_script): Fix online documentation
>         of 'define' command.
> ---
>  gdb/cli/cli-script.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
> index 72de8ec1c7..8ceecdf435 100644
> --- a/gdb/cli/cli-script.c
> +++ b/gdb/cli/cli-script.c
> @@ -1602,7 +1602,8 @@ Define a new command name.  Command name is argument.\n\
>  Definition appears on following lines, one command per line.\n\
>  End with a line of just \"end\".\n\
>  Use the \"document\" command to give documentation for the new command.\n\
> -Commands defined in this way may have up to ten arguments."));
> +Commands defined in this way may accept an unlimited number of arguments\n\
> +accessed via $arg0 .. $argN. $argc tells how many arguments have been passed."));

Two spaces after period, keep the length <= 80 columns.  Otherwise, LGTM.

Simon

Patch

diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index 72de8ec1c7..8ceecdf435 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -1602,7 +1602,8 @@  Define a new command name.  Command name is argument.\n\
 Definition appears on following lines, one command per line.\n\
 End with a line of just \"end\".\n\
 Use the \"document\" command to give documentation for the new command.\n\
-Commands defined in this way may have up to ten arguments."));
+Commands defined in this way may accept an unlimited number of arguments\n\
+accessed via $arg0 .. $argN. $argc tells how many arguments have been passed."));
 
   add_com ("while", class_support, while_command, _("\
 Execute nested commands WHILE the conditional expression is non zero.\n\