diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2010-07-14 19:46:01 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2010-07-14 19:46:01 +0000 |
commit | 368886ac463c9e75337621a29292de8ff5744ce6 (patch) | |
tree | 4cc193fa9c72affe05c2b03908b8ec08e426d199 /gas/testsuite/lib | |
parent | 3cbaedfff7a843d64792766c0322ea3a66ef6cb2 (diff) | |
download | fsf-binutils-gdb-368886ac463c9e75337621a29292de8ff5744ce6.zip fsf-binutils-gdb-368886ac463c9e75337621a29292de8ff5744ce6.tar.gz fsf-binutils-gdb-368886ac463c9e75337621a29292de8ff5744ce6.tar.bz2 |
Add addr2line, objcopy and strip tests for compressed debug sections.
binutils/testsuite/
2010-07-14 H.J. Lu <hongjiu.lu@intel.com>
* config/default.exp (binutils_assemble): Use
default_binutils_assemble_flags.
(binutils_assemble_flags): New.
* lib/utils-lib.exp (default_binutils_assemble): Renamed to ...
(default_binutils_assemble_flags): This. Add asflags and
pass it to target_assemble.
(run_dump_test): Support assembler flags.
* binutils-all/i386/compressed-1.s: New.
* binutils-all/i386/compressed-1a.d: Likewise.
* binutils-all/i386/compressed-1b.d: Likewise.
* binutils-all/i386/compressed-1c.d: Likewise.
* binutils-all/i386/i386.exp: Likewise.
* binutils-all/x86-64/compressed-1.s: Likewise.
* binutils-all/x86-64/compressed-1a.d: Likewise.
* binutils-all/x86-64/compressed-1b.d: Likewise.
* binutils-all/x86-64/compressed-1c.d: Likewise.
* binutils-all/x86-64/x86-64.exp: Likewise.
gas/testsuite/
2010-07-14 H.J. Lu <hongjiu.lu@intel.com>
* config/default.exp (ADDR2LINE): New.
(ADDR2LINEFLAGS): Likewise.
* gas/i386/i386.exp: Run dw2-compress-2 and x86-64-dw2-compress-2.
* gas/i386/dw2-compress-2.d: New.
* gas/i386/dw2-compress-2.s: Likewise.
* gas/i386/x86-64-dw2-compress-2.d: Likewise.
* gas/i386/x86-64-dw2-compress-2.s: Likewise.
* lib/gas-defs.exp (run_dump_test): Support addr2line as dump
program.
(slurp_options): Allow numbers in options.
Diffstat (limited to 'gas/testsuite/lib')
-rw-r--r-- | gas/testsuite/lib/gas-defs.exp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gas/testsuite/lib/gas-defs.exp b/gas/testsuite/lib/gas-defs.exp index fd2f179..cfdecc4 100644 --- a/gas/testsuite/lib/gas-defs.exp +++ b/gas/testsuite/lib/gas-defs.exp @@ -402,6 +402,7 @@ proc run_dump_tests { testcases {extra_options {}} } { # as: FLAGS # When assembling FILE.s, pass FLAGS to the assembler. # +# addr2line: FLAGS # nm: FLAGS # objcopy: FLAGS # objdump: FLAGS @@ -410,7 +411,7 @@ proc run_dump_tests { testcases {extra_options {}} } { # FLAGS, in addition to the .o file name. Note that they are run # with LC_ALL=C in the environment to give consistent sorting # of symbols. If no FLAGS are needed then use: -# PROG: [nm objcopy objdump readelf] +# PROG: [nm objcopy objdump readelf addr2line] # instead. # # source: SOURCE @@ -468,6 +469,7 @@ proc run_dump_test { name {extra_options {}} } { global subdir srcdir global OBJDUMP NM AS OBJCOPY READELF global OBJDUMPFLAGS NMFLAGS ASFLAGS OBJCOPYFLAGS READELFFLAGS + global ADDR2LINE ADDR2LINEFLAGS global host_triplet global env @@ -483,6 +485,7 @@ proc run_dump_test { name {extra_options {}} } { unresolved $subdir/$name return } + set opts(addr2line) {} set opts(as) {} set opts(objdump) {} set opts(nm) {} @@ -561,6 +564,7 @@ proc run_dump_test { name {extra_options {}} } { if { $opts(error) == "" && $opts(error-output) == "" } { if {$opts(PROG) != ""} { switch -- $opts(PROG) { + addr2line { set program addr2line } objdump { set program objdump } nm { set program nm } objcopy { set program objcopy } @@ -572,7 +576,7 @@ proc run_dump_test { name {extra_options {}} } { } } else { # Guess which program to run, by seeing which option was specified. - foreach p {objdump objcopy nm readelf} { + foreach p {objdump objcopy nm readelf addr2line} { if {$opts($p) != ""} { if {$program != ""} { perror "ambiguous dump program in $file.d" @@ -790,7 +794,7 @@ proc slurp_options { file } { set nws {[^ ]*} # whitespace is ignored anywhere except within the options list; # option names are alphabetic plus dash - set pat "^#${ws}(\[a-zA-Z-\]*)$ws:${ws}(.*)$ws\$" + set pat "^#${ws}(\[a-zA-Z0-9-\]*)$ws:${ws}(.*)$ws\$" while { [gets $f line] != -1 } { set line [string trim $line] # Whitespace here is space-tab. |