This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 1/2] New GDB/MI command "-info-gdb-mi-command"
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 18 Nov 2013 19:24:45 +0200
- Subject: Re: [RFA 1/2] New GDB/MI command "-info-gdb-mi-command"
- Authentication-results: sourceware.org; auth=none
- References: <528631F2 dot 40408 at redhat dot com> <1384794719-20594-1-git-send-email-brobecker at adacore dot com> <1384794719-20594-2-git-send-email-brobecker at adacore dot com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> From: Joel Brobecker <brobecker@adacore.com>
> Date: Mon, 18 Nov 2013 21:11:58 +0400
>
> Regarding some questions Eli had:
>
> | > +(the leading dash (@code{-}) in the command name should be omitted).
> | Is this wise? How about if we support both with and without the dash?
>
> I now think that it was indeed the correct choice. Not only does it
> facilitate implementation (but only marginally), it also is consistent
> with the current output. For instance, notice how GDB names the command
> in the following error message:
>
> -unsupported
> ^error,msg="Undefined MI command: unsupported"
> ^^^^^^^^^^^
> (no leading dash)
Your example shows _output_ from MI. By contrast, we are talking
about _input_. When I send commands to MI, I cannot omit the leading
dash, so it can be very natural to consider it part of the command.
We don't have to advertise that we support the dash,
> Also, looking at the grammar, the leading dash isn't listed
> as part of what they call the "operation"
IMO, this line of reasoning makes little sense to users. Grammars are
for programs, not for people.
> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -153,6 +153,9 @@ show startup-with-shell
>
> ** All MI commands now accept an optional "--language" option.
>
> + ** The new command -info-gdb-mi-command allows the user to determine
> + whether a GDB/MI command is supported or not.
> +
OK for this part.
> +Here is an example where the @sc{gdb/mi} command does not exist:
> +
> +@smallexample
> +-info-gdb-mi-command unsupported-command
> +^done,command=@{exists="false"@}
> +@end smallexample
> +
> +And here is an example where the @sc{gdb/mi} command is known
> +to the debugger:
You want @noindent before "And here".
The documentation parts are OK with that change.
Thanks.