From: Nick Clifton Date: Tue, 4 Aug 2015 07:19:12 +0000 (+0100) Subject: Update description of proc run_dump_test X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=beab5d94abdbea50febb1e189198fdec43db47c9;p=binutils-gdb.git Update description of proc run_dump_test * lib/utils-lib.exp (run_dump_test): Document DUMPPROG, readelf and size parameters. Alpha-sort switch tables. Include addr2line, and size in list of possible auto-detected dump programs. --- diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog index a0fb9620d21..1076ca7d079 100644 --- a/binutils/testsuite/ChangeLog +++ b/binutils/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2015-08-04 Nick Clifton + + * lib/utils-lib.exp (run_dump_test): Document DUMPPROG, readelf + and size parameters. Alpha-sort switch tables. Include + addr2line, and size in list of possible auto-detected dump + programs. + 2015-07-24 Nick Clifton * binutils-all/localize-hidden-1.d: Allow for extra symbols in the diff --git a/binutils/testsuite/lib/utils-lib.exp b/binutils/testsuite/lib/utils-lib.exp index f87b39061f4..9c24cf17ba7 100644 --- a/binutils/testsuite/lib/utils-lib.exp +++ b/binutils/testsuite/lib/utils-lib.exp @@ -180,14 +180,22 @@ proc exe_ext {} { # When assembling FILE.s, pass FLAGS to the assembler. # # PROG: PROGRAM-NAME -# The name of the program to run to analyze the .o file produced -# by the assembler. This can be omitted; run_dump_test will guess -# which program to run by seeing which of the flags options below -# is present. +# The name of the program to run to modify or analyze the .o file +# produced by the assembler. This option is required. Recognised +# names are: ar, elfedit, nm, objcopy, ranlib, strings, and strip. +# +# DUMPPROG: PROGRAM-NAME +# The name of the program to run to analyze the .o file after it has +# has been modified by PROG. This can be omitted; run_dump_test will +# guess which program to run by seeing if any of the flags options +# for the recognised dump programs are set. Recognised names are: +# addr2line, nm, objdump, readelf and size. # -# objdump: FLAGS # nm: FLAGS # objcopy: FLAGS +# objdump: FLAGS +# readelf: FLAGS +# size: FLAGS # Use the specified program to analyze the .o file, and pass it # FLAGS, in addition to the .o file name. Note that they are run # with LC_ALL=C in the environment to give consistent sorting @@ -269,16 +277,16 @@ proc run_dump_test { name {extra_options {}} } { set opts(addr2line) {} set opts(ar) {} set opts(as) {} + set opts(elfedit) {} + set opts(name) {} set opts(nm) {} set opts(objcopy) {} set opts(objdump) {} - set opts(strip) {} set opts(ranlib) {} set opts(readelf) {} set opts(size) {} set opts(strings) {} - set opts(name) {} - set opts(elfedit) {} + set opts(strip) {} set opts(PROG) {} set opts(DUMPPROG) {} set opts(source) {} @@ -337,7 +345,7 @@ proc run_dump_test { name {extra_options {}} } { verbose "Testing $testname" if {$opts(PROG) == ""} { - perror "program isn't set in $file.d" + perror "PROG isn't set in $file.d" unresolved $testname return } @@ -345,15 +353,15 @@ proc run_dump_test { name {extra_options {}} } { set destopt "" switch -- $opts(PROG) { ar { set program ar } + elfedit { set program elfedit } + nm { set program nm } objcopy { set program objcopy } ranlib { set program ranlib } + strings { set program strings } strip { set program strip set destopt "-o" } - strings { set program strings } - elfedit { set program elfedit } - nm { set program nm } default { perror "unrecognized program option $opts(PROG) in $file.d" unresolved $testname @@ -375,10 +383,10 @@ proc run_dump_test { name {extra_options {}} } { } } else { # Guess which program to run, by seeing which option was specified. - foreach p {objdump nm readelf} { + foreach p {addr2line nm objdump readelf size} { if {$opts($p) != ""} { if {$dumpprogram != ""} { - perror "ambiguous dump program in $file.d" + perror "more than one possible dump program specified in $file.d" unresolved $testname return } else {