From 344c97118d14fbbc1e156e459a046f63bab99d9a Mon Sep 17 00:00:00 2001 From: Fred Fish Date: Mon, 16 Feb 2004 19:04:52 +0000 Subject: 2004-02-16 Fred Fish * gdb.arch/gdb1291.c: Remove * gdb.arch/gdb1291.s: New test input file. * gdb.arch/gdb1291.exp: Expand test to check case that should not fail. Test for correct result, known incorrect result, other failures and timeouts. --- gdb/testsuite/gdb.arch/gdb1291.exp | 42 ++++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 6 deletions(-) (limited to 'gdb/testsuite/gdb.arch/gdb1291.exp') diff --git a/gdb/testsuite/gdb.arch/gdb1291.exp b/gdb/testsuite/gdb.arch/gdb1291.exp index 2c1f4cc..4264d6c 100644 --- a/gdb/testsuite/gdb.arch/gdb1291.exp +++ b/gdb/testsuite/gdb.arch/gdb1291.exp @@ -37,9 +37,9 @@ if ![istarget "sh-*-*"] then { } set testfile "gdb1291" -set srcfile ${testfile}.c +set srcfile ${testfile}.s set binfile ${objdir}/${subdir}/${testfile} -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable ""] != "" } { gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." } @@ -56,7 +56,37 @@ if ![runto_main] then { gdb_suppress_tests } -gdb_test "b sub" "Breakpoint 2*" "set breakpoint" -gdb_test "c" "Breakpoint 2*" "get to sub" -gdb_test "bt" "#0\[ \t\]*$hex \\(\\) at sh-bt.*\r\n#1\[ \t\]*$hex in main.*" \ - "backtrace in gdb1291" +gdb_test "b sub1" "Breakpoint 2.*" "set breakpoint" +gdb_test "c" "Breakpoint 2.* sub1 .*" "get to sub1" + +send_gdb "bt\n" +gdb_expect { + -re "#0.* sub1 .*\r\n#1\[ \t\]*$hex in main \\(\\).*\r\n$gdb_prompt $" { + pass "backtrace with local variable less than or equal to 256 bytes" + } + -re ".*$gdb_prompt $" { + fail "backtrace with local variable less than or equal to 256 bytes" + } + timeout { + fail "backtrace with local variable less than or equal to 256 bytes (timeout)" + } +} + +gdb_test "b sub2" "Breakpoint 3.*" "set breakpoint" +gdb_test "c" "Breakpoint 3.* sub2 .*" "get to sub2" + +send_gdb "bt\n" +gdb_expect { + -re "#0.* sub2 .*\r\n#1\[ \t\]*$hex in main \\(\\).*\r\n$gdb_prompt $" { + pass "backtrace with local variable larger than 256 bytes" + } + -re "#0.* sub2 .*\r\n#1 0x00000000 in \\?\\? \\(\\).*\r\n$gdb_prompt $" { + kfail "gdb/1291" "backtrace with local variable larger than 256 bytes" + } + -re ".*$gdb_prompt $" { + fail "backtrace with local variable larger than 256 bytes" + } + timeout { + fail "backtrace with local variable larger than 256 bytes (timeout)" + } +} -- cgit v1.1