This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA 2/2] Add "undefined-command" error code at end of ^error result...

On 11/18/2013 05:11 PM, Joel Brobecker wrote:

> gdb/ChangeLog:
>         (from Pedro Alves  <>)
>         (from Joel Brobecker  <>)
>         * exceptions.h (enum_errors) <UNKNOWN_COMMAND_ERROR>: New enum.
>         * mi/mi-parse.c (mi_parse): Thow UNKNOWN_COMMAND_ERROR instead


>         of a regular error when the GDB/MI command does not exist.
>         * mi/mi-main.c (mi_cmd_list_features): Add
>         "undefined-command-error-code".
>         (mi_print_exception): Print an "undefined-command"

s/in/is ?

>         * NEWS: Add entry documenting the new "code" variable in
>         "^error" result records.
> gdb/doc/ChangeLog:
>         * gdb.texinfo (GDB/MI Result Records): Fix the syntax of the
>         "^error" result record concerning the error message.  Document
>         the error code that may also be part of that result record.
>         (GDB/MI Miscellaneous Commands): Document the
>         "undefined-command-error-code" element in the output of
>         the "-list-features" GDB/MI command.
> gdb/testsuite/ChangeLog:
>         * gdb.mi/mi-undefined-cmd.exp: New testcase.
> Tested on x86_64-linux.  OK to commit?

Looks good to me...

> (hmmm, now that I have spent all that time typing everything up,
> I am wondering if I should rename UNKNOWN_COMMAND_ERROR into
> UNDEFINED_COMMAND_ERROR - no real biggie either way...)

Yeah, I think so.  The CLI also says "undefined":

 (gdb) asdf
 Undefined command: "asdf".  Try "help".

Might as well be consistent throughout.

Pedro Alves

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]