Re: [RFC] New GDB/MI command "-info-gdb-mi-command"

Eli Zaretskii
2013-11-12T16:39:36Z

> From: Joel Brobecker <brobecker@adacore.com>
> Cc: gdb-patches@sourceware.org
> Date: Tue, 12 Nov 2013 15:25:04 +0400
>
> This patch adds a new GDB/MI command meant for graphical frontends
> trying to determine whether a given GDB/MI command exists or not.
>
> Examples:
>
> -info-gdb-mi-command unsupported-command
> ^done,command={exists="false"}
> (gdb)
> -info-gdb-mi-command symbol-list-lines
> ^done,command={exists="true"}
> (gdb)

Sounds good to me.

> +@subheading The @code{-info-gdb-mi-command} Command
> +@findex -info-gdb-mi-command

This should be prominently indexed with @cindex entries, as this
command is very important, and should be easily found.

> +@subsubheading Synopsis
> +
> +@smallexample
> + -info-gdb-mi-command CMD_NAME
> +@end smallexample
> +
> +Query support for the @sc{gdb/mi} command named @var{CMD_NAME}

Ts-ts-ts... ASCII art habits die hard. Use @var in the example, and
don't upcase CMD_NAME (it is upcased in Info anyway, and will look
better in print in lower case).

> +(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?

> +There is no corresponding @value{GDBN} command.

Having a way of querying that in CLI would facilitate better .gdbinit
files, I think.

> +@smallexample
> +-info-gdb-mi-command symbol-list-lines
> +^done,command=@{exists="true"@}
> +@end smallexample

Btw, why "command="? Perhaps "result="?

Other than that, the documentation is fine with me.

Thanks.