This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] 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: tromey at redhat dot com, gdb-patches at sourceware dot org
- Date: Tue, 12 Nov 2013 18:38:37 +0200
- Subject: Re: [RFC] New GDB/MI command "-info-gdb-mi-command"
- Authentication-results: sourceware.org; auth=none
- References: <8761rzknb4 dot fsf at fleche dot redhat dot com> <1384255504-28444-1-git-send-email-brobecker at adacore dot com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> 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.