Blob Blame History Raw
diff -Nurp ltrace-0.5-orig/testsuite/ltrace.torture/ia64-sigill.exp ltrace-0.5/testsuite/ltrace.torture/ia64-sigill.exp
--- ltrace-0.5-orig/testsuite/ltrace.torture/ia64-sigill.exp	1969-12-31 19:00:00.000000000 -0500
+++ ltrace-0.5/testsuite/ltrace.torture/ia64-sigill.exp	2007-05-04 13:29:43.000000000 -0400
@@ -0,0 +1,33 @@
+# This file was written by Yao Qi <qiyao@cn.ibm.com>.
+
+set testfile "ia64-sigill"
+set srcfile ${testfile}.s
+set binfile ${testfile}
+
+if { [istarget ia64-*] } then {
+    verbose "compiling source file now....."
+    # Build the shared libraries this test case needs.
+    if  { [ ltrace_compile "${srcdir}/${subdir}/${testfile}.s" "${srcdir}/${subdir}/${binfile}" executable {debug} ] != "" } {
+	 send_user "Testcase compile failed, so all tests in this file will automatically fail\n."
+    }
+
+    # Run PUT for ltarce.
+    set exec_output [ltrace_runtest $srcdir/$subdir $srcdir/$subdir/$binfile]
+
+    # Check the output of this program.
+    verbose "ltrace runtest output: $exec_output\n"
+    if [regexp {ELF from incompatible architecture} $exec_output] {
+	    fail "32-bit ltrace can not perform on 64-bit PUTs and rebuild ltrace in 64 bit mode!"
+	    return
+    } elseif [ regexp {Couldn't get .hash data} $exec_output ] {
+	    fail "Couldn't get .hash data!"
+	    return
+    }
+
+    catch "exec sh -c {grep SIGILL ${srcdir}/${subdir}/${testfile}.ltrace | wc -l ;exit}" output
+    if { $output == 0 } then {
+	pass "ltrace did interpret SIGILL as breakpoint."
+    } else {
+	fail "ltrace failed to interpret SIGILL as breakpoint."
+    }
+}
diff -Nurp ltrace-0.5-orig/testsuite/ltrace.torture/ia64-sigill.s ltrace-0.5/testsuite/ltrace.torture/ia64-sigill.s
--- ltrace-0.5-orig/testsuite/ltrace.torture/ia64-sigill.s	1969-12-31 19:00:00.000000000 -0500
+++ ltrace-0.5/testsuite/ltrace.torture/ia64-sigill.s	2007-05-04 12:51:14.000000000 -0400
@@ -0,0 +1,43 @@
+	.file	"pokus.c"
+	.pred.safe_across_calls p1-p5,p16-p63
+	.section	.rodata
+	.align 8
+.LC0:
+	stringz	""
+	.text
+	.align 16
+	.global main#
+	.proc main#
+main:
+	.prologue 14, 32
+	.save ar.pfs, r33
+	alloc r33 = ar.pfs, 0, 4, 1, 0
+	.vframe r34
+	mov r34 = r12
+	mov r35 = r1
+	.save rp, r32
+	mov r32 = b0
+	.body
+	addl r36 = @ltoffx(.LC0), r1
+	;;
+	ld8.mov r36 = [r36], .LC0
+	br.call.sptk.many b0 = printf#
+	nop.b 0x0
+	nop.b 0x1
+	nop.b 0x2
+	nop.b 0x0
+	nop.b 0x1
+	nop.b 0x2
+	mov r1 = r35
+	addl r14 = 234, r0
+	;;
+	mov r8 = r14
+	mov ar.pfs = r33
+	mov b0 = r32
+	.restore sp
+	mov r12 = r34
+	br.ret.sptk.many b0
+	;;
+	.endp main#
+	.section	.note.GNU-stack,"",@progbits
+	.ident	"GCC: (GNU) 3.4.6 20060404 (Red Hat 3.4.6-3)"