This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] fix error checking on add-symbol-file command.
- From: Pedro Alves <palves at redhat dot com>
- To: Muhammad Bilal <mbilal at codesourcery dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 03 Sep 2013 17:00:18 +0100
- Subject: Re: [patch] fix error checking on add-symbol-file command.
- Authentication-results: sourceware.org; auth=none
- References: <52248FE1 dot 8030800 at codesourcery dot com> <52249253 dot 6060901 at codesourcery dot com> <5224DC3E dot 2060909 at redhat dot com> <5225C2EB dot 4030602 at codesourcery dot com>
On 09/03/2013 12:07 PM, Muhammad Bilal wrote:
> * symfile.c (add_symbol_file_command): Error out on unknown
> option.
> Handling EXPECTING_SEC_* before '-' options and collapse
> into single conditional branch.
Write:
* symfile.c (add_symbol_file_command): Error out on unknown
option. Handle EXPECTING_SEC_ADDR/EXPECTING_SEC_NAME before '-'
options and collapse into single conditional branch.
> + else if (strcmp (arg, "-readnow") == 0)
^^
Spurious space.
> gdb_start
> gdb_reinitialize_dir $srcdir/$subdir
> +#Check that invalid options are rejected.
Add empty line before comment.
> +foreach x {"-raednow" "readnow" "foo" "-readnow s"} {
> + gdb_test "add-symbol-file ${binfile} 0 $x" \
> + "USAGE: add-symbol-file <filename> <textaddress>.*-readnow.*-s <secname> <addr>.*" \
> + "unknow option $x"
typo: "unknown". Make that:
"add-symbol-file: unknown option $x"
OK with those changes.
Thanks,
--
Pedro Alves