This is the mail archive of the gdb-patches@sourceware.org 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: [patch] fix error checking on add-symbol-file command.


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



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