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 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


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