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.
This commit is contained in:
Nick Clifton 2015-08-04 08:19:12 +01:00
parent edc66de9a5
commit beab5d94ab
2 changed files with 29 additions and 14 deletions

View 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

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