1
# This file was written by Yao Qi <qiyao@cn.ibm.com>.
3
set testfile "ia64-sigill"
4
set srcfile ${testfile}.s
5
set binfile ${testfile}
7
if { [istarget ia64-*] } then {
8
verbose "compiling source file now....."
9
# Build the shared libraries this test case needs.
10
if { [ ltrace_compile "${srcdir}/${subdir}/${testfile}.s" "${srcdir}/${subdir}/${binfile}" executable {debug} ] != "" } {
11
send_user "Testcase compile failed, so all tests in this file will automatically fail\n."
15
set exec_output [ltrace_runtest $srcdir/$subdir $srcdir/$subdir/$binfile]
17
# Check the output of this program.
18
verbose "ltrace runtest output: $exec_output\n"
19
if [regexp {ELF from incompatible architecture} $exec_output] {
20
fail "32-bit ltrace can not perform on 64-bit PUTs and rebuild ltrace in 64 bit mode!"
22
} elseif [ regexp {Couldn't get .hash data} $exec_output ] {
23
fail "Couldn't get .hash data!"
27
catch "exec sh -c {grep SIGILL ${srcdir}/${subdir}/${testfile}.ltrace | wc -l ;exit}" output
28
if { $output == 0 } then {
29
pass "ltrace did interpret SIGILL as breakpoint."
31
fail "ltrace failed to interpret SIGILL as breakpoint."