> > 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. To me, documentation is not an issue. I confess that I remain unconvinced in this case, especially since this is a command meant for programs rather than humans, so the risk of using it improperly is low, given the clear documentation. However, I don't have a strong opinion, and supporting both forms is pretty easy, so unless someone strongly objects to allowing the second form, I've just gone ahead and added it. Updated patch attached. And for review convenience, I am also attaching a diff of the changes I made on top of path #1 (to get to the updated patch). gdb/ChangeLog: * mi/mi-cmds.h (mi_cmd_info_gdb_mi_command): Declare. * mi/mi-cmd-info.c (mi_cmd_info_gdb_mi_command): New function. * mi/mi-cmds.c (mi_cmds): Add -info-gdb-mi-command command. * mi/mi-main.c (mi_cmd_list_features): Add "info-gdb-mi-command" field to output of "-list-features". * NEWS: Add entry for new -info-gdb-mi-command. gdb/doc/ChangeLog: * gdb.texinfo (GDB/MI Miscellaneous Commands): Document the new -info-gdb-mi-command GDB/MI command. Document the meaning of "-info-gdb-mi-command" in the output of -list-features. gdb/testsuite/ChangeLog: * gdb.mi/mi-i-cmd.exp: New file. Re-tested on x86_64-linux. OK to commit? Thank you, -- Joel