This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 2/2] Add "undefined-command" error code at end of ^error result...
- From: Pedro Alves <palves at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 19 Nov 2013 11:13:30 +0000
- Subject: Re: [RFA 2/2] Add "undefined-command" error code at end of ^error result...
- 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-3-git-send-email-brobecker at adacore dot com>
On 11/18/2013 05:11 PM, Joel Brobecker wrote:
> gdb/ChangeLog:
>
> (from Pedro Alves <palves@redhat.com>)
> (from Joel Brobecker <brobecker@adacore.com>)
> * exceptions.h (enum_errors) <UNKNOWN_COMMAND_ERROR>: New enum.
> * mi/mi-parse.c (mi_parse): Thow UNKNOWN_COMMAND_ERROR instead
"Throw"
> 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"
> error code if EXCEPTION.ERROR in UNKNOWN_COMMAND_ERROR.
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