Line 1... |
Line 1... |
# Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
# Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
# 2003, 2004, 2007, 2008, 2009
|
# 2003, 2004, 2007, 2008, 2009, 2011
|
# Free Software Foundation, Inc.
|
# Free Software Foundation, Inc.
|
|
|
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
# the Free Software Foundation; either version 3 of the License, or
|
# the Free Software Foundation; either version 3 of the License, or
|
Line 201... |
Line 201... |
} else {
|
} else {
|
pass "objdump -W"
|
pass "objdump -W"
|
}
|
}
|
}
|
}
|
|
|
|
# Test objdump -WL on a file that contains line information for multiple files and search directories.
|
|
|
|
if { ![is_elf_format] || [istarget "ia64*-*-*"]} then {
|
|
unsupported "objump decode line"
|
|
} else {
|
|
if { ![binutils_assemble $srcdir/$subdir/dw2-decodedline.S tmpdir/dw2-decodedline.o] } then {
|
|
fail "objdump decoded line"
|
|
}
|
|
|
|
if [is_remote host] {
|
|
set decodedline_testfile [remote_download host tmpdir/dw2-decodedline.o]
|
|
} else {
|
|
set decodedline_testfile tmpdir/dw2-decodedline.o
|
|
}
|
|
|
|
set got [remote_exec host "$OBJDUMP $OBJDUMPFLAGS -WL $decodedline_testfile" "" "/dev/null" "objdump.out"]
|
|
|
|
if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then {
|
|
fail "objdump -WL (reason: unexpected output)"
|
|
send_log $got
|
|
send_log "\n"
|
|
}
|
|
|
|
if { [regexp_diff objdump.out $srcdir/$subdir/objdump.WL] } then {
|
|
fail "objdump -WL"
|
|
} else {
|
|
pass "objdump -WL"
|
|
}
|
|
}
|
|
|
# Options which are not tested: -a -d -D -R -T -x -l --stabs
|
# Options which are not tested: -a -d -D -R -T -x -l --stabs
|
# I don't see any generic way to test any of these other than -a.
|
# I don't see any generic way to test any of these other than -a.
|
# Tests could be written for specific targets, and that should be done
|
# Tests could be written for specific targets, and that should be done
|
# if specific problems are found.
|
# if specific problems are found.
|