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: Muhammad Bilal <mbilal at codesourcery dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Wed, 4 Sep 2013 11:22:50 +0500
- 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> <52260792 dot 1010204 at redhat dot com>
On 09/03/2013 09:00 PM, Pedro Alves wrote:
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.
Fixed.
+ else if (strcmp (arg, "-readnow") == 0)
^^
Spurious space.
Fixed.
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
+#Check that invalid options are rejected.
Add empty line before comment.
Fixed.
+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,
Thanks for review the patch.
Patch has been committed as
https://sourceware.org/ml/gdb-cvs/2013-09/msg00018.html
Thanks,
-Bilal