1# This file was written by Yao Qi <qiyao@cn.ibm.com>. 2 3set testfile "ia64-sigill" 4set srcfile ${testfile}.s 5set binfile ${testfile} 6 7if { [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." 12 } 13 14 # Run PUT for ltarce. 15 set exec_output [ltrace_runtest $srcdir/$subdir $srcdir/$subdir/$binfile] 16 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!" 21 return 22 } elseif [ regexp {Couldn't get .hash data} $exec_output ] { 23 fail "Couldn't get .hash data!" 24 return 25 } 26 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." 30 } else { 31 fail "ltrace failed to interpret SIGILL as breakpoint." 32 } 33} 34