Update description of proc run_dump_test
authorNick Clifton <nickc@redhat.com>
Tue, 4 Aug 2015 07:19:12 +0000 (08:19 +0100)
committerNick Clifton <nickc@redhat.com>
Tue, 4 Aug 2015 07:19:12 +0000 (08:19 +0100)
* 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.

binutils/testsuite/ChangeLog
binutils/testsuite/lib/utils-lib.exp

index a0fb9620d21b1bb6df261a603b602fd4a4a0a6a4..1076ca7d07953833d7ceda2de8fc6d47c22895f6 100644 (file)
@@ -1,3 +1,10 @@
+2015-08-04  Nick Clifton  <nickc@redhat.com>
+
+       * 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  <nickc@redhat.com>
 
        * binutils-all/localize-hidden-1.d: Allow for extra symbols in the
index f87b39061f4a7d3d6f4a4313d0072fec9a847974..9c24cf17ba7ba4e1d5feeb9b996123e5d686de11 100644 (file)
@@ -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 {
This page took 0.029802 seconds and 4 git commands to generate.