aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2015-08-04 08:19:12 +0100
committerNick Clifton <nickc@redhat.com>2015-08-04 08:19:12 +0100
commitbeab5d94abdbea50febb1e189198fdec43db47c9 (patch)
treeb362980e7e5ad84934864e76b433ad7976a75633 /binutils
parentedc66de9a5883295bb32fad2c87bf4c62f97f54a (diff)
downloadgdb-beab5d94abdbea50febb1e189198fdec43db47c9.zip
gdb-beab5d94abdbea50febb1e189198fdec43db47c9.tar.gz
gdb-beab5d94abdbea50febb1e189198fdec43db47c9.tar.bz2
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.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/testsuite/ChangeLog7
-rw-r--r--binutils/testsuite/lib/utils-lib.exp36
2 files changed, 29 insertions, 14 deletions
diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog
index a0fb962..1076ca7 100644
--- a/binutils/testsuite/ChangeLog
+++ b/binutils/testsuite/ChangeLog
@@ -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
diff --git a/binutils/testsuite/lib/utils-lib.exp b/binutils/testsuite/lib/utils-lib.exp
index f87b390..9c24cf1 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 {